warrenchen 75e235b8e3 Add admin area controllers and views for managing OAuth clients, security settings, subscriptions, and tenants
- Implemented OAuthClientsController for CRUD operations on OAuth clients.
- Added SecurityController to manage security settings.
- Created SubscriptionsController for handling subscriptions with export functionality.
- Developed TenantsController for tenant management including create, edit, and delete operations.
- Added views for each controller to facilitate user interaction.
- Introduced layout and shared views for consistent admin UI.
- Implemented model classes for handling data in views.
- Added validation and error handling in forms.
2026-04-01 17:40:45 +09:00

63 lines
2.7 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.

# UI 規劃(管理者 / 會員)
## 會員中心(統一 UI
### 會員端
- 註冊 / 登入 / 忘記密碼 / 修改密碼
- Email 驗證
- 個人資料Email 為主)
- 訂閱管理(清單與偏好)
- 退訂(單一清單)
- 連結外站(可選:回到來源站點)
### 管理者端
- 租戶管理Tenant CRUD
- OAuth Client 管理usage / redirect_uris / client_id / client_secretscope 由 usage 自動配置)
- 電子報清單管理Lists CRUD
- 訂閱查詢 / 匯出
- 審計紀錄查詢
- 系統設定安全策略、token 時效)
## 各站自建 UIAPI
### 會員端
- 登入 / 註冊 / 忘記密碼 / 修改密碼
- Email 驗證頁(可自建或導回會員中心)
- 訂閱表單(未登入)
- 訂閱偏好管理(登入後)
- 退訂頁(從 email token 進來)
### 管理者端
- 站內顯示會員資料(只讀)
- 站內訂閱狀態顯示
## UI 核心原則
- 會員中心 UI 為統一入口(少數情境)
- 其餘皆走 API 與各站自建 UI
- 會員中心 UI 不承擔行銷內容或寄送
- `MemberCenter.Web` 採 client-first 介面admin 功能以角色判斷後顯示於同一登入入口內
- `/admin/*``Areas/Admin` 提供獨立管理區殼層
- 非 admin 或未登入存取 `/admin/*` 時,回 `404`
## UI 路徑對應Use Cases
### 會員端(統一 UI
- UC-01 註冊會員: `/account/register`
- UC-02 登入: `/account/login`
- UC-03 登出: `POST /account/logout`
- UC-04 忘記密碼 / 重設密碼: `/account/forgotpassword`, `/account/resetpassword`
- UC-04.1 已登入修改密碼: `/account/changepassword`
- UC-05 Email 驗證: `/account/verifyemail?email=...&token=...`
- UC-07 訂閱確認double opt-in: `/newsletter/confirm?token=...`
- UC-08 取消訂閱(單一清單): `/newsletter/unsubscribe?token=...`
- UC-09 訂閱偏好管理(登入後): `/newsletter/preferences?list_id=...&email=...`
- UC-10 會員資料查看: `/profile`
### 管理者端(統一 UI
- UC-11 租戶管理: `/admin/tenants`
- UC-11.1 Tenant 可設定 `Send Engine Webhook Client Id`UUID
- UC-12 OAuth Client 管理: `/admin/oauth-clients`(建立時顯示一次 client_secret可旋轉可選 `usage=tenant_api` / `send_api` / `webhook_outbound` / `platform_service``platform_service` 可不指定 tenant
- `redirect_uris``webhook_outbound` 需要;其餘 usage 不需要
- `tenant_api` / `send_api` / `platform_service` 強制 `client_type=confidential`
- UC-13 電子報清單管理: `/admin/newsletter-lists`
- UC-14 訂閱查詢 / 匯出: `/admin/subscriptions`, `/admin/subscriptions/export`
- UC-15 審計紀錄查詢: `/admin/audit-logs`
- UC-16 安全策略設定: `/admin/security`