2.2 KiB
2.2 KiB
Repository Guidelines
Project Structure & Module Organization
backend/is a Spring Boot 2.7 (Java 17) service with MyBatis-Plus and JWT security.- Main code:
backend/src/main/java/com/gpf/pethospital - Config:
backend/src/main/resources/application.ymlandapplication-dev.yml
- Main code:
frontend/is a Vue 3 + Vite app with Pinia and TDesign.- Source:
frontend/src/(pages, router, store, layouts, styles) - Static assets:
frontend/src/assets/
- Source:
docs/and*.drawiocontain documentation and UML/ER diagrams.frp/andstart_frp.shinclude FRP configuration/scripts.
Build, Test, and Development Commands
Backend (from backend/):
mvn spring-boot:run— run the API locally.mvn clean package— build a runnable jar.mvn test— run Spring Boot tests (if present).
Frontend (from frontend/):
npm install— install dependencies.npm run dev— start Vite dev server.npm run build— production build.npm run preview— preview the production build.
Coding Style & Naming Conventions
- Java: 4-space indentation, standard Spring Boot conventions, packages under
com.gpf.pethospital. - Vue/TypeScript: ES module syntax, semicolons used; follow existing file structure.
- Use descriptive, domain-specific names (e.g.,
AppointmentController,appointmentService).
Testing Guidelines
- No dedicated test directories are present yet.
- Backend tests should go in
backend/src/test/javausing Spring Boot Test. - Frontend has no test runner configured; if adding, include a script in
frontend/package.json.
Commit & Pull Request Guidelines
- Current commit history uses short Chinese descriptions like “添加…” and “将…更改为…”.
- Keep messages short, imperative, and meaningful; avoid placeholder commits like “1”.
- PRs should include: a clear summary, testing performed (or “not run”), and screenshots for UI changes.
Configuration & Security Notes
application-dev.ymlcontains local MySQL defaults (userroot, passwordpassword). Update credentials via environment or local overrides; do not commit real secrets.- JWT secrets are currently hardcoded in config; rotate for real deployments.