Files
FTC25009/AGENTS.md
2026-06-24 09:13:18 +08:00

2.8 KiB

Repository Guidelines

Project Structure & Module Organization

This repository is a RuoYi-based WMS application. The Java backend is a Maven multi-module project rooted at pom.xml: ruoyi-admin is the Spring Boot entry point; ruoyi-framework, ruoyi-system, ruoyi-quartz, ruoyi-generator, and ruoyi-common hold framework, system, scheduled-job, generator, and utility code. Resources, MyBatis XML, and configuration live under each module's src/main/resources.

The Vue 2 admin web app is in ruoyi-ui. PDA/mobile uni-app code is in pda, with pages, api, store, utils, and static. Database setup and migration helpers are in sql and scripts.

Build, Test, and Development Commands

  • mvn clean package: build all backend modules with Java 17.
  • mvn spring-boot:run -pl ruoyi-admin: run the backend locally.
  • cd ruoyi-ui && npm install: install dependencies from package-lock.json.
  • cd ruoyi-ui && npm run dev: start the Vue admin UI, normally at http://localhost:80.
  • cd ruoyi-ui && npm run build:prod: create the production UI build.
  • ./ry.sh or ry.bat: use bundled RuoYi startup scripts for upstream-style deployment.

Coding Style & Naming Conventions

Use UTF-8. The admin UI .editorconfig sets two-space indentation, LF endings, final newlines, and trimmed trailing whitespace; follow that style for JavaScript, Vue, SCSS, JSON, and Markdown. Java packages stay under com.ruoyi; keep the RuoYi layering pattern: controller, domain, mapper, service, and service.impl. Name Java classes by role, for example BasWarehouseController, IBasWarehouseService, and BasWarehouseMapper. Keep MyBatis XML names aligned with mapper interfaces.

Testing Guidelines

No project-owned test suite is currently present. For backend changes, add JUnit tests under the affected module's src/test/java and run mvn test or mvn -pl <module> test. For UI changes, at minimum run npm run build:prod; add component or integration tests if introducing test tooling. For SQL changes, verify scripts against a disposable schema before review.

Commit & Pull Request Guidelines

Git history currently contains only the initial commit (项目初始化), so keep future commits short, imperative, and scoped, for example fix: validate tray binding status or feat: add stock detail export. Pull requests should describe the change, list backend/UI/SQL impact, include verification commands, link issues when available, and attach screenshots for visible UI or PDA changes.

Security & Configuration Tips

Do not commit real credentials, tokens, or production endpoints. Keep values in ruoyi-admin/src/main/resources/application*.yml, ruoyi-ui/.env.*, and pda/config.js sanitized before sharing. Treat SQL scripts as deployable artifacts: make them repeatable when possible and clearly name destructive operations.