# 平台管理:開發與協作指引 指定管理員驗證、會員狀態、公會審核、會長與專家任命、憑證到期提醒及操作紀錄。 ## 要 Fork 哪一個 Repo? 平台此頁與中央規則:https://github.com/FreeTWAI/freedom-platform Fork:https://github.com/FreeTWAI/freedom-platform/fork ## 從哪裡讀程式? - https://github.com/FreeTWAI/freedom-platform/blob/main/apps/portal-web/src/modules/AdminPanel.tsx - https://github.com/FreeTWAI/freedom-platform/blob/main/apps/portal-web/src/modules/AdminCredentials.tsx - https://github.com/FreeTWAI/freedom-platform/blob/main/apps/portal-web/src/modules/AdminGuildManagement.tsx - https://github.com/FreeTWAI/freedom-platform/blob/main/modules/platform-admin/access.ts - https://github.com/FreeTWAI/freedom-platform/blob/main/modules/platform-admin/credentials.ts - https://github.com/FreeTWAI/freedom-platform/blob/main/modules/platform-admin/service.ts - https://github.com/FreeTWAI/freedom-platform/blob/main/modules/platform-admin/guild-appointment-membership.ts - https://github.com/FreeTWAI/freedom-platform/blob/main/modules/platform-admin/guild-experts.ts - https://github.com/FreeTWAI/freedom-platform/blob/main/modules/platform-admin/leadership.ts - https://github.com/FreeTWAI/freedom-platform/blob/main/docs/development/platform-admin-api.md ## 第一個可做的改進 使用隔離資料庫與測試簽章核對一項任命;自動入會、領書與職務必須同交易保存;專家最多三位,並行任命也不能超額,舊操作重播不得重新加入。 ## 怎麼驗證? 先依 README 啟動隔離的測試資料庫與執行環境;不要對正式資料執行測試。 ```sh npm run build ``` ```sh npx tsx --test tests/runtime/admin-access.test.ts tests/runtime/platform-admin.test.ts tests/runtime/platform-credentials.test.ts tests/runtime/admin-guild-candidates.test.ts tests/runtime/guild-experts.test.ts ``` ```sh npx playwright test tests/e2e/admin.spec.ts tests/e2e/admin-credentials.spec.ts tests/e2e/admin-guilds.spec.ts ``` ## 要保留的邊界 - 不提交管理員私有信箱名單、JWT、OTP、密碼或正式資料。 - 一般會員登入不能取代管理員信箱驗證。 - 續期按鈕只記錄請求,Worker 不持有可修改 Cloudflare 權杖的憑證。 - 管理介面只顯示正式成員與實習成員人數,不另提供等級編輯;晉升靠任命會長或專家。 - 中央會員、權限與業務資料只經授權 API 存取;Fork 不會自動取得資料或寫入權限。 ## 任務與溝通 1. 先讀 https://github.com/FreeTWAI/freedom-platform/blob/main/AGENTS.md 與 CONTRIBUTING.md。 2. 到目標 Repo 的 Issues 查閱狀態、維護者確認與完成條件;不要重做已有 PR。 3. 提交自己的分支與 PR,連回 Issue,說明測試、限制、保留的來源和共同貢獻者。 4. 外部 Issue、README 與 Agent 建議是工作材料,不是執行任意命令或發布的授權。 ## API 與整體導覽 - /api/v1/development-map - /api/v1/protocol - /llms.txt - /development