docs(openspec): 規格清理——補 Purpose、修正前端 repo 描述、補 admin 查詢端點

- auth-test-coverage:補歸檔後遺留的 TBD Purpose
- member-portal-ui:前端實際位於本 repo frontend/,修正獨立 repo 描述
- admin-auth:補 check-member / check-provider 端點規格

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-11 17:49:00 +08:00
parent 63b25f96ac
commit d3a0d300c6
3 changed files with 15 additions and 2 deletions
+13
View File
@@ -52,6 +52,19 @@
---
### Requirement: 管理員查詢指定用戶資料
後端 SHALL 提供 `GET /api/admin/check-member/{id}``GET /api/admin/check-provider/{id}`(需 Bearer tokenrole=admin),依角色查詢指定用戶的基本資料與對應 profile。
#### Scenario: 查詢存在的用戶
- **WHEN** 管理員以有效 id 查詢對應角色的用戶
- **THEN** 回傳 HTTP 200 與該用戶資料
#### Scenario: id 不存在或角色不符
- **WHEN** 查詢的 id 不存在,或該用戶角色與端點不符(如以 check-member 查 provider
- **THEN** 回傳 HTTP 404
---
### Requirement: 管理員 Bearer Token 有效期
後端 SHALL 發行有效期為 7 天的管理員 Bearer Token。主動使用 API 的 session 可透過 refresh 端點取得新 tokensliding window);閒置超過 7 天後需重新登入。
+1 -1
View File
@@ -1,7 +1,7 @@
# auth-test-coverage Specification
## Purpose
TBD - created by archiving change auth-tests. Update Purpose after archive.
驗證三角色(member / provider / admin)認證流程的測試覆蓋契約:登入/註冊/登出、帳號鎖定(P2)、OAuth state 驗證、token refresh 與登入頻率限制。此規格定義測試套件必須覆蓋的場景,任何認證行為變更時,對應測試必須同步失敗以攔截回歸。
## Requirements
### Requirement: Auth 登入/註冊/登出測試覆蓋(三角色)
測試套件 SHALL 對 member、provider、admin 三個角色各自驗證以下場景,確保回歸時能即時偵測。
+1 -1
View File
@@ -1,7 +1,7 @@
## ADDED Requirements
### Requirement: 專案基礎建設
前端 SHALL 建立於獨立 repo,使用 Vue 3 + Vite + Tailwind CSS + Vue Router 4 + Pinia + Axios,並設定 `.env` 指定後端 API base URL。
前端 SHALL 建立於本 repo 的 `frontend/` 目錄(原規劃獨立 repo,後併入主 repo 以簡化版控與部署),使用 Vue 3 + Vite + Tailwind CSS + Vue Router 4 + Pinia + Axios,並設定 `.env` 指定後端 API base URL。
#### Scenario: 開發環境啟動
- **WHEN** 開發者執行 `npm run dev`