Files
member-platform/docs/LOCAL_DEV_RUNBOOK.md

32 lines
873 B
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.
# Local Dev Runbook
## 1) 啟動後端
```bash
cd backend
./scripts/start_dev.sh
```
## 2) 啟動前端
```bash
cd frontend
npm install
npm run dev
```
## 3) 重要環境變數
- `backend/.env.development`
- `ADMIN_REQUIRED_GROUPS=member-admin`
- 優先使用 `KEYCLOAK_*`(若有設定 `KEYCLOAK_BASE_URL + KEYCLOAK_REALM`
- 未設定 Keycloak 時,才使用 `AUTHENTIK_*` 備援
## 4) 基本檢查
- `GET http://127.0.0.1:8000/healthz`
- 登入後打 `GET /admin/members` 應可回資料
- 非 admin 群組帳號打 `/admin/*` 應回 `403`
## 5) 會員流程驗收
1. 新增會員username/email/display_name開啟 sync_to_authentik此旗標目前代表「同步到外部 IdP」
2. 確認列表可看到新會員與 `user_sub`
3. 點「重設密碼」,取得臨時密碼
4. 到 Keycloak或 Authentik驗證該會員可用新密碼登入