34 lines
1.8 KiB
Markdown
34 lines
1.8 KiB
Markdown
# Repository Guidelines
|
|
|
|
## Project Structure & Module Organization
|
|
- `backend/`: Spring Boot 2.7 (JDK 8) service. Main code in `backend/src/main/java`, config in `backend/src/main/resources`.
|
|
- `frontend/`: Vue 2 + Element UI client. Source in `frontend/src`, router in `frontend/src/router`, API wrappers in `frontend/src/api`.
|
|
- `backend/sql/init.sql`: MySQL schema and seed data.
|
|
- `uploads/` and `files/`: runtime upload directories (ignored by git).
|
|
|
|
## Build, Test, and Development Commands
|
|
- Backend (from `backend/`):
|
|
- `mvn spring-boot:run`: start the API server on `localhost:8080`.
|
|
- Frontend (from `frontend/`):
|
|
- `npm install`: install dependencies.
|
|
- `npm run serve`: start dev server on `localhost:8081` with proxy to `/api`.
|
|
- `npm run build`: build production assets to `frontend/dist`.
|
|
|
|
## Coding Style & Naming Conventions
|
|
- Java: 4-space indentation, PascalCase for classes, camelCase for fields/methods.
|
|
- Vue/JS: 2-space indentation, camelCase for variables/functions, kebab-case for routes.
|
|
- No lint/format tooling is configured; keep diffs focused and consistent with existing files.
|
|
|
|
## Testing Guidelines
|
|
- No automated tests are currently configured for backend or frontend.
|
|
- If you add tests, prefer standard defaults: JUnit for Spring Boot and Jest/Vue Test Utils for Vue.
|
|
|
|
## Commit & Pull Request Guidelines
|
|
- Existing commit messages are short and informal (e.g., `add`, `first commit`).
|
|
- If you add commits, use concise, present-tense messages (e.g., `add order status tags`).
|
|
- PRs should include a brief description, relevant screenshots for UI changes, and any setup steps.
|
|
|
|
## Configuration & Security Notes
|
|
- Update DB credentials and upload path in `backend/src/main/resources/application.yml`.
|
|
- API tokens (e.g., AI service) should be stored in config and not committed to git.
|