docs: add frontend handoff architecture and index

This commit is contained in:
Chris
2026-03-29 23:15:15 +08:00
parent dbd2ccf43f
commit a880c99857
5 changed files with 243 additions and 45 deletions

View File

@@ -0,0 +1,29 @@
# Frontend Implementation Checklist
## A. 專案初始化
- [ ] 建立 `src/api/http.ts`
- [ ] 建立 `src/stores/auth.ts`
- [ ] 建立 `src/stores/permission.ts`
- [ ] 配置 `VITE_API_BASE_URL`
## B. API 對接
- [ ] `GET /me`
- [ ] `GET /me/permissions/snapshot`
- [ ] `POST /admin/permissions/grant`
- [ ] `POST /admin/permissions/revoke`
## C. 頁面
- [ ] Me 頁面(顯示 sub/email/display_name
- [ ] 我的權限頁(表格)
- [ ] 權限管理頁grant/revoke
## D. 行為驗證
- [ ] Bearer token 遺失時顯示重新登入
- [ ] grant 成功後自動刷新 snapshot
- [ ] revoke 成功後自動刷新 snapshot
- [ ] 404 user_not_found 顯示可讀錯誤訊息
## E. 交付條件
- [ ] 三個頁面都可獨立刷新
- [ ] 所有 API 錯誤碼都有 UI 提示
- [ ] 主要操作有 loading 與成功提示