Files
zyzhixi_canva_mo/README.md
T

34 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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`