docs: rebuild documentation set for new architecture and add DB schema guide

This commit is contained in:
Chris
2026-03-30 19:21:54 +08:00
parent f884f1043d
commit 37a69081e3
18 changed files with 245 additions and 916 deletions

22
docs/BACKEND_TASKPLAN.md Normal file
View File

@@ -0,0 +1,22 @@
# Backend TaskPlan
## 待辦
- [ ] 重寫 `backend/scripts/init_schema.sql` 為乾淨重建版drop/recreate
- [ ] 刪除非必要舊表與舊權限模型(只留群組中心模型)
- [ ] 新增/調整查詢 API
- [ ] 系統明細關聯(群組、會員)
- [ ] 模組明細關聯(群組、會員)
- [ ] 公司底下站台列表
- [ ] 會員所屬群組列表
- [ ] action 驗證改為只允許 `view/edit`
- [ ] scope 驗證改為只允許 `site`
- [ ] 補齊 API 錯誤碼一致性400/404/409
## 進行中
- [ ] 新 schema 與 API 契約對齊設計(以群組整合權限為中心)
## 已完成
- [x] 後端已具備 systems/modules/companies/sites/members/permission-groups 基礎 CRUD 能力
- [x] 本地開發環境(`.env.development`)可啟動並連線 DB
- [x] 管理 API 認證統一使用 `X-Client-Key` + `X-API-Key`
- [x] Authentik 會員同步流程已能在 upsert/update 路徑運作