feat: implement admin panel for platform management #40

Merged
chihlasm merged 3 commits from feat/admin-panel into main 2026-02-08 11:53:41 +00:00
chihlasm commented 2026-02-08 11:12:59 +00:00 (Migrated from github.com)

Summary

  • Full admin panel with 9 pages: Dashboard, Users, Invite Codes, Audit Logs, Plan Limits, Feature Flags, Platform Settings, Global Categories, and Team Categories (account owner)
  • 5 new DB tables (migration 026): account_limit_overrides, feature_flags, plan_feature_defaults, account_feature_overrides, platform_settings
  • ~25 new API endpoints across 6 endpoint modules with settings manager (in-memory cache, 60s TTL)
  • 9 reusable admin components (DataTable, Pagination, ActionMenu, StatusBadge, EmptyState, SearchInput, PageHeader, AdminLayout, AdminSidebar)
  • 29 new backend integration tests
  • All pages code-split with lazy loading

Test plan

  • Run alembic upgrade head to apply migration 026
  • Log in as super_admin — verify "Admin Panel" nav link appears
  • Verify Dashboard shows metrics and recent activity
  • Test user management (role changes, activate/deactivate, move account)
  • Test invite code create/delete
  • Test audit log filtering and CSV export
  • Test plan limits editing and account overrides CRUD
  • Test feature flag matrix toggles and account overrides
  • Test platform settings (maintenance mode toggle)
  • Test global categories CRUD
  • Test team categories CRUD under /account/categories
  • Run pytest --override-ini="addopts=" — all 132 tests pass
  • Run npm run build — clean build

🤖 Generated with Claude Code

## Summary - Full admin panel with 9 pages: Dashboard, Users, Invite Codes, Audit Logs, Plan Limits, Feature Flags, Platform Settings, Global Categories, and Team Categories (account owner) - 5 new DB tables (migration 026): account_limit_overrides, feature_flags, plan_feature_defaults, account_feature_overrides, platform_settings - ~25 new API endpoints across 6 endpoint modules with settings manager (in-memory cache, 60s TTL) - 9 reusable admin components (DataTable, Pagination, ActionMenu, StatusBadge, EmptyState, SearchInput, PageHeader, AdminLayout, AdminSidebar) - 29 new backend integration tests - All pages code-split with lazy loading ## Test plan - [ ] Run `alembic upgrade head` to apply migration 026 - [ ] Log in as super_admin — verify "Admin Panel" nav link appears - [ ] Verify Dashboard shows metrics and recent activity - [ ] Test user management (role changes, activate/deactivate, move account) - [ ] Test invite code create/delete - [ ] Test audit log filtering and CSV export - [ ] Test plan limits editing and account overrides CRUD - [ ] Test feature flag matrix toggles and account overrides - [ ] Test platform settings (maintenance mode toggle) - [ ] Test global categories CRUD - [ ] Test team categories CRUD under /account/categories - [ ] Run `pytest --override-ini="addopts="` — all 132 tests pass - [ ] Run `npm run build` — clean build 🤖 Generated with [Claude Code](https://claude.com/claude-code)
railway-app[bot] commented 2026-02-08 11:13:13 +00:00 (Migrated from github.com)

🚅 Deployed to the patherly-pr-40 environment in selfless-grace

Service Status Web Updated (UTC)
patherly Success (View Logs) Feb 8, 2026 at 11:14 am
hopeful-liberation Success (View Logs) Feb 8, 2026 at 11:14 am
<!-- railway-bot-comment-version=2 --> <!-- railway-project-id="22b9b58c-271b-42e5-a10e-6fdec8d00134" railway-project-name="selfless-grace" --> 🚅 Deployed to the [patherly-pr-40](https://railway.com/project/22b9b58c-271b-42e5-a10e-6fdec8d00134?environmentId=896f10fe-9276-406e-a4a5-153a2c2be25e) environment in **[selfless-grace](https://railway.com/project/22b9b58c-271b-42e5-a10e-6fdec8d00134)** | **Service** | **Status** | **Web** | **Updated** (UTC) | | :--- | :--- | :--- | :--- | | patherly | ✅ Success ([View Logs](https://railway.com/project/22b9b58c-271b-42e5-a10e-6fdec8d00134/service/95f556ff-5264-4116-a0c2-618a2fc53ba4?id=f09b2d0e-04fa-4428-b2c2-b23739296c79&environmentId=896f10fe-9276-406e-a4a5-153a2c2be25e)) | | Feb 8, 2026 at 11:14 am | | hopeful-liberation | ✅ Success ([View Logs](https://railway.com/project/22b9b58c-271b-42e5-a10e-6fdec8d00134/service/e1db2ee3-d241-4f45-abe4-c9c5fdf483d5?id=d0f6ee9a-4aa0-4998-94cb-fe7e31616cee&environmentId=896f10fe-9276-406e-a4a5-153a2c2be25e)) | | Feb 8, 2026 at 11:14 am |
Sign in to join this conversation.