1.7 KiB
1.7 KiB
Backend AGENTS
This directory is the Spring Boot backend for yoyuzh.xyz. Keep changes aligned with the current package layout instead of introducing a new architecture.
Backend layout
src/main/java/com/yoyuzh/auth: authentication, JWT, login/register/profile DTOs and services.src/main/java/com/yoyuzh/files: file APIs and storage flows, includingfiles/storage.src/main/java/com/yoyuzh/cqu: CQU schedule/grade aggregation.src/main/java/com/yoyuzh/config: Spring and security configuration.src/main/java/com/yoyuzh/common: shared exceptions and common utilities.src/main/resources: runtime config and logging.src/test/java/com/yoyuzh/...: matching package-level tests.
Real backend commands
Run these from backend/:
mvn spring-boot:runmvn spring-boot:run -Dspring-boot.run.profiles=devmvn testmvn package
There is no dedicated backend lint command and no dedicated backend typecheck command in the checked-in Maven config or README. If a task asks for lint/typecheck, say that the backend currently does not define those commands.
Backend rules
- Keep controller, service, DTO, config, and storage responsibilities separated along the current package boundaries.
- When changing
auth,files, orcqu, check whether an existing test package already covers that area before adding new files elsewhere. - Respect the existing
devprofile inapplication-dev.yml; do not hardcode assumptions that bypass H2 or mock CQU behavior. - If a change affects file storage behavior, note that the repo currently supports local storage and OSS-related migration/deploy scripts.
- Prefer Maven-based verification from this directory instead of ad hoc shell pipelines.