chore: initialize application scaffold

This commit is contained in:
2026-08-23 19:55:59 +08:00
parent 36088ce005
commit 6591e3fa1e
36 changed files with 7771 additions and 0 deletions
+31
View File
@@ -1,2 +1,33 @@
# zyzhixi_canva_mo
本仓库提供遵循项目规范的 NestJS、Vue 3、PostgreSQL 前后端分离示例框架。
## 应用职责
- `apps/api`:基于 NestJS 的 REST API,采用 controller、service、repository、entity、dto 分层。
- `apps/web`:基于 Vue 3 与 TDesign Vue Next 的用户端。
- `apps/admin`:基于 Vue 3 与 Arco Design Vue 的后台管理端。
- `docs`:接口、数据库及架构维护文档。
## 环境准备
1. 复制 `.env.example``.env`,填写 PostgreSQL 连接信息。
2. 在根目录执行 `npm install`
3. 确保 PostgreSQL 中已创建 `example_app` 数据库。
## 常用命令
```bash
npm run dev
npm run build
npm run start:api
```
用户端默认地址为 `http://localhost:5173`,管理端默认地址为 `http://localhost:5174`API 默认地址为 `http://localhost:3000/api/v1`
## 开发约束
- 新接口必须遵循 `/api/v1/资源名` 的 REST 路径规范。
- Controller 只处理协议转换;业务逻辑放在 Service;数据访问放在 Repository。
- 新增页面或组件时按职责分文件,禁止堆叠到单个组件文件。
- 数据库结构、接口变更必须同步更新 `docs`