- 新增 CLAUDE.md 文件,提供项目概述、技术栈、命令和架构信息 - 新增多个代码审查和文档生成专家的配置文件,包括 backend-reviewer、frontend-reviewer、database-expert、api-documenter、test-generator 和 refactor-expert - 新增 QUICK-REFERENCE.md 文件,提供快速参考和使用指南 - 新增 agents 目录下的 README.md 文件,详细说明各个 agent 的用途和使用方法 这些更改旨在提升开发效率和代码质量,提供清晰的指导和工具支持。
144 lines
4.3 KiB
Markdown
144 lines
4.3 KiB
Markdown
# CLAUDE.md
|
|
|
|
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
|
|
## Project Overview
|
|
|
|
XL Prison Management System (XL监狱综合管理平台) - A prison management platform built on the Yudao (芋道) project framework. Currently in active development phase integrating 8 prison-related modules.
|
|
|
|
## Tech Stack
|
|
|
|
**Backend**: Java 17, Spring Boot 3.5.9, MyBatis-Plus, Maven multi-module
|
|
**Frontend**: Vue 3.5.12, Vite 5.1.4, TypeScript 5.3.3, Element Plus, Pinia, Vue Router
|
|
**Database**: MySQL
|
|
|
|
## Commands
|
|
|
|
### Backend (Java/Maven)
|
|
```bash
|
|
# Build all modules
|
|
cd backend && mvn clean install -DskipTests
|
|
|
|
# Build specific module
|
|
cd backend/yudao-module-prison && mvn clean package
|
|
|
|
# Run development server
|
|
cd backend/yudao-server && mvn spring-boot:run
|
|
```
|
|
|
|
### Frontend (Vue/Vite)
|
|
```bash
|
|
cd frontend
|
|
|
|
# Install dependencies
|
|
pnpm install
|
|
|
|
# Dev server (local mode)
|
|
pnpm dev
|
|
|
|
# TypeScript check
|
|
pnpm ts:check
|
|
|
|
# Build for different environments
|
|
pnpm build:local # Local build
|
|
pnpm build:dev # Development
|
|
pnpm build:test # Testing
|
|
pnpm build:prod # Production
|
|
|
|
# Linting
|
|
pnpm lint:eslint # ESLint fix
|
|
pnpm lint:format # Prettier format
|
|
```
|
|
|
|
## Architecture
|
|
|
|
### Backend Structure
|
|
```
|
|
backend/
|
|
├── yudao-server/ # Main application entry
|
|
├── yudao-framework/ # Core framework (security, web, mybatis, redis, etc.)
|
|
├── yudao-module-system/ # User/permission system module
|
|
├── yudao-module-infra/ # Infrastructure module (code gen, config)
|
|
└── yudao-module-prison/ # Prison management module (active development)
|
|
```
|
|
|
|
**Prison Module Structure** (`yudao-module-prison/`):
|
|
```
|
|
src/main/java/cn/iocoder/yudao/module/prison/
|
|
├── controller/admin/{module}/ # REST API controllers
|
|
│ ├── {Module}Controller.java
|
|
│ └── vo/ # Request/Response VO objects
|
|
├── service/{module}/ # Service layer
|
|
│ ├── {Module}Service.java
|
|
│ └── impl/{Module}ServiceImpl.java
|
|
├── dal/{module}/ # Data access layer (MyBatis-Plus)
|
|
├── convert/{module}/ # DO to VO converters
|
|
├── enums/ # Enum definitions & error codes
|
|
└── util/ # Utility classes
|
|
```
|
|
|
|
### Frontend Structure
|
|
```
|
|
frontend/src/
|
|
├── views/{module}/ # Page components
|
|
├── api/{module}/ # API definitions
|
|
├── components/ # Shared components
|
|
├── store/ # Pinia stores
|
|
├── router/ # Vue Router config
|
|
├── hooks/ # Composable hooks
|
|
├── types/ # TypeScript definitions
|
|
└── utils/ # Utility functions
|
|
```
|
|
|
|
**Prison Views Pattern**:
|
|
```
|
|
views/prison/{module}/
|
|
├── index.vue # List page with search/form
|
|
└── {Module}Form.vue # Create/Edit form dialog
|
|
```
|
|
|
|
**Prison API Pattern**:
|
|
```
|
|
api/prison/{module}/index.ts # Axios API calls
|
|
```
|
|
|
|
## Current Integration Status
|
|
|
|
**8 Modules being integrated into prison module**:
|
|
| Module | Chinese | Status |
|
|
|--------|---------|--------|
|
|
| Area | 监区管理 | In progress |
|
|
| Cell | 监室管理 | In progress |
|
|
| Consumption | 消费记录 | In progress |
|
|
| Question | 问卷问题 | In progress |
|
|
| Questionnaire | 问卷模板 | In progress |
|
|
| QuestionnaireRecord | 问卷答题记录 | In progress |
|
|
| RiskAssessment | 危险评估 | In progress |
|
|
| Score | 计分考核 | In progress |
|
|
|
|
See `implement/plan.md` for detailed integration tasks.
|
|
|
|
## Database
|
|
|
|
**Development Database**:
|
|
```
|
|
jdbc:mysql://192.168.10.130:3306/xlcp_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true
|
|
```
|
|
|
|
SQL scripts located at:
|
|
- `backend/yudao-module-prison/src/main/resources/sql/prison_module.sql` - Module tables and menu permissions
|
|
|
|
## Configuration
|
|
|
|
**Mock Settings** (application-*.yml):
|
|
- `mock-secret`: Mock authentication secret
|
|
- `mock-enable`: Enable/disable mock mode (true/false)
|
|
|
|
## Important Notes
|
|
|
|
- Frontend files use `views/prison/` and `api/prison/` paths
|
|
- Backend uses package prefix `cn.iocoder.yudao.module.prison`
|
|
- Error codes defined in `ErrorCodeConstants.java`
|
|
- Enum types defined in `enums/` directory
|
|
- Codegen source files in `codegen/` directory
|