Files
wvp-platform/AGENTS.md

2.3 KiB

`# Repository Guidelines

Project Structure & Module Organization

  • src/main/java: Spring Boot backend source.
  • src/main/resources: application config and resources (e.g., application.yml, application-*.yml).
  • src/test/java: backend tests (currently minimal; example: JT1078ServerTest.java).
  • web/: Vue 2 frontend app (Element UI, Vue CLI).
  • docker/: Docker Compose files and environment configuration (docker/.env).
  • docs/ and doc/: project documentation and media assets.
  • libs/, tools/, 数据库/: local dependencies, tooling, and database assets.

Build, Test, and Development Commands

Backend (local dev):

  • mvn clean package -Dmaven.test.skip=true: build backend jar quickly.
  • java -jar target/wvp-pro-2.7.4-*.jar --spring.profiles.active=dev: run with dev profile.
  • mvn -DskipTests=false test: run backend tests (tests are skipped by default in pom.xml).

Frontend (from web/):

  • npm run dev: local dev server.
  • npm run build:prod: production build.
  • npm run lint: lint Vue/JS code.
  • npm run test:unit: run Jest unit tests.

Docker (from docker/):

  • docker compose build: build images.
  • docker compose up -d: start full stack.
  • docker compose logs -f polaris-wvp: tail backend logs.

Coding Style & Naming Conventions

  • Java: follow existing Spring Boot style in src/main/java (4-space indentation, standard Java naming).
  • Vue/JS: follow ESLint rules in web/ (npm run lint).
  • Config files: use application-<profile>.yml naming for Spring profiles.

Testing Guidelines

  • Backend: tests live under src/test/java and typically use *Test class suffix.
  • Frontend: Jest via npm run test:unit.
  • There is no enforced coverage gate in the repo; keep tests focused on new behavior.

Commit & Pull Request Guidelines

  • Commit messages follow Conventional Commit-style prefixes: feat, fix, chore, refactor, optionally with scopes (e.g., feat(aiot): ...).
  • PRs should include: a concise summary, relevant config changes (application-*.yml, docker/.env), and screenshots for UI changes in web/.

Configuration Tips

  • Local dev settings live in src/main/resources/application-dev.yml.
  • Docker configuration lives in docker/.env (ports, SIP settings, IPs). Update these when changing network topology.