docs: 培训前端说明与 gitignore

This commit is contained in:
2026-08-23 22:32:43 +08:00
parent 97054a9699
commit 3c9a13ae6a
2 changed files with 57 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
# 依赖与构建产物
node_modules/
dist/
**/.swc/
*.log
# 微信开发者工具私有配置
project.private.config.json
# 运行时数据(mock server JSON 数据库)
website/server/accounts.json
website/server/bookings.json
website/server/events.json
website/server/tests.json
website/server/policyLogs.json
website/server/planLogs.json
website/server/surveyLogs.json
# IDE / OS
.DS_Store
.idea/
.vscode/
+35
View File
@@ -0,0 +1,35 @@
# OPC 培训系统代码(opc-training
**云南省 OPC 培训课程体系的全部可运行代码**,源自 `培训计划/课程体系0.1`,现按「代码与内容分离」规范独立于此。
> 课程内容、模板、知识库、交付 SOP 等**非代码资料**在 `materials/培训计划/`。本目录只含可运行的代码与部署脚本。
## 组成
| 目录 | 说明 |
|------|------|
| `miniprogram/` | **C 端微信小程序**Taro 3.6 + React 18,编译 weapp)。页面:首页 / 活动报名 / OPC 测评 / 政策 / 我的 等。 |
| `website/` | **三端 Web 应用**Vite 5 + React 18`opc-training-web`)。`src/user/` 对外 C 端、`src/platform/` 管理/报表、`src/data/` 内容数据。 |
| `server/` | **后端**FastAPI + SQLiteuv 管理,`:8091`)。认证、活动报名/签到、OPC 测评引擎、政策/计划/调研。 |
| `sync-server.sh` | 后端部署同步脚本。 |
## 与课程内容的对应关系
- 三端架构、小程序↔网页同步约束:见 `materials/培训计划/课程体系0.1/三端架构设计.md``小程序同步约束.md`
- 产品规格与课程设计:见 `materials/培训计划/课程体系0.1/课程产品体系.md``课程设计/`
- 内容数据(测评题库等)与前端展示内容:见 `materials/培训计划/课程体系0.1/` 各内容目录
## 常用命令
```bash
# 小程序(Taro → 微信)
cd miniprogram && yarn dev:weapp
# 后端(uv
cd server && uv run uvicorn app.main:app --port 8091 --reload
# 网站(Vite
cd website && pnpm dev
```
> 上线说明与后端部署见各子目录 `README.md`。