- common/tools 工具模块,10 个子功能:md5/cryptox/uuid/random/timex/convertx/strx/slicex/ip/filex(薄封装 GoFrame 内置组件) - AGENTS.md 项目智能体说明书(架构、规范、命令、记忆体系索引) - docs/change-log/2026-08-24.md 本次请求与变更记录 - .gitignore 排除 .workbuddy/;PROJECT_STRUCTURE.md 补充目录树
34 lines
1.9 KiB
Go
34 lines
1.9 KiB
Go
# Production layout
|
|
|
|
```text
|
|
service.xpcool.com/
|
|
├── api/ # HTTP contracts and Swagger metadata
|
|
│ ├── user/v1/ # /api/v1 - client-facing API
|
|
│ └── admin/v1/ # /admin/v1 - administration API
|
|
├── common/ # public reusable module (no internal/ deps)
|
|
│ └── tools/ # utility toolbox: md5, cryptox, uuid, random,
|
|
│ # timex, convertx, strx, slicex, ip, filex
|
|
├── internal/
|
|
│ ├── cmd/ # application bootstrap and route isolation
|
|
│ ├── consts/ # application error codes and constants
|
|
│ ├── controller/ # API-to-service adapters only
|
|
│ ├── service/ # domain use cases and provider interfaces
|
|
│ ├── dao/ # generated by gf gen dao; never hand edited
|
|
│ ├── model/
|
|
│ │ ├── entity/ # generated database entities
|
|
│ │ ├── do/ # generated Data Objects
|
|
│ │ ├── dto/ # service boundary input/output
|
|
│ │ └── vo/ # API view models
|
|
│ ├── middleware/ # configurable route-group middleware
|
|
│ └── library/ # JWT, response, pagination primitives
|
|
├── docs/change-log/ # per-request change records (agent context)
|
|
├── manifest/
|
|
│ ├── config/ # config.dev/test/prod.yaml
|
|
│ └── sql/ # ordered MySQL migrations
|
|
└── utility/ # optional cross-cutting helpers
|
|
```
|
|
|
|
`dao`, `model/do` and `model/entity` are generated after migration, so their schema never drifts from MySQL. Controllers do not access DAO; only services do.
|
|
|
|
See `AGENTS.md` for the agent-facing conventions and the context-memory system.
|