feat(admin): build admin app foundation
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- github-actions, react, vite
- 領域
- api, authentication, authorization, backend, ci-cd, database, devops, frontend, full-stack
調査の方向性
Start with the linked design spec, then inspect apps/web, packages/api, packages/auth-shell, and the planned apps/admin workspace. Run the existing project tests before implementing the listed policy, audit, API, frontend, deployment, and workflow requirements. Done means the checklist is complete and the policy, audit integration, and sign-in smoke tests pass.
索引モデルが issue の本文から書いたものです。
説明
Summary
Establish the foundation for admin.us-rse.org — workspace, auth posture, role/permission model, audit infrastructure, and frontend shell that every later admin subsystem inherits without rework. Spec lives at docs/superpowers/specs/2026-05-09-admin-app-foundation-design.md.
Requirements
- Extract
packages/auth-shellfromapps/web(AuthKit provider, env-check guard, root error boundary, useApi fetch wrapper). Public app continues to work unchanged. - Schema: add
stafftouser_roleenum, backfillWHERE role = 'admin', deprecateadminin a follow-up rev. -
packages/api/src/lib/policies/directory withcanEnterAdminApp,canApproveVocab,canMergeUsers,canEditGroup,canEditEvent,canViewAuditLog+ Vitest tests. -
requireActorContextmiddleware: walk merge chain to canonical user, load leadership terms + chair memberships, populatec.var.actor. Returns 403 ifcanEnterAdminAppfails. -
requirePolicy(policy, scopeFn)middleware factory. Mount admin entry gate on the/api/admin/*sub-app. -
auditMiddlewareafterware: write oneaudit_logrow per mutating admin request. Handlers enrich payload viac.var.auditPayloadandc.var.auditCapture(prior). -
GET /api/admin/me— returns{ user, systemTier, positions: { leadership, chairedGroups, chairedEvents } }. -
GET /api/admin/audit— cursor-paginated audit reader, filterable by actor / action / targetType / targetId / date range, super_admin only. -
apps/adminworkspace: Vite + React 19 + React Router 7 + design-system tokens. Mirrorsapps/webpatterns. Vite dev proxy/api→:8787. - Admin shell: sidebar (numbered nav, adaptive per
useNavSections()), top bar, dashboard tiles, audit page, stub routes for every future subsystem. - Cloudflare Pages project
us-rse-adminwithadmin.us-rse.orgcustom domain +_redirectsfor/api/*and SPA fallback. -
.github/workflows/deploy-admin.ymlwith path filters onapps/admin/**,packages/auth-shell/**,packages/design-system/**. - WorkOS redirect URIs registered for
admin.us-rse.org/auth/callback+ preview pattern. - Foundation tests: policy unit tests, audit middleware integration test, one end-to-end sign-in smoke.
Context
Spec was the result of a /superpowers:brainstorming session that decomposed the broader admin-app idea into a foundation plus ten follow-up subsystems. The foundation is intentionally feature-light — it ships the cross-cutting infrastructure so each subsystem (members, vocab, organizations, groups, events, recognition, forms, elections, communications, operations) lands on a stable target.
Implementation Notes
- Same WorkOS project for both SPAs; admin gate is a role check, not an auth-system check.
- Same Worker for both
/api/*and/api/admin/*; sub-app pattern keeps the boundary obvious in code reviews. - Code-defined policies, not data-defined. Auth changes are PR-reviewed and shipped.
- Audit middleware captures every mutating request automatically; handlers can opt into before/after diffs for irreversible-feeling actions.
- 主要言語
- HTML
- スター
- 33
- フォーク
- 107
- 平均マージ
- 14時間 6分
- マージ済み PR(30日)
- 19
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
USRSE/usrse.github.io のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
USRSE/usrse.github.io#2117 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 63/100
USRSE/usrse.github.io#2115 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
broken-links
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
USRSE/usrse.github.io#2099 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
USRSE/usrse.github.io#2085 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
USRSE/usrse.github.io#2001 ·
メンテナーはふだん 1 日以内に返信
USRSE/usrse.github.io の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
rubenarslan/formr#63 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
qoretechnologies/qore#8159 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信