Skip to content

Implement admin operations panel#698

Open
alexgduarte wants to merge 1 commit into
SecureBananaLabs:mainfrom
alexgduarte:codex/admin-panel-29
Open

Implement admin operations panel#698
alexgduarte wants to merge 1 commit into
SecureBananaLabs:mainfrom
alexgduarte:codex/admin-panel-29

Conversation

@alexgduarte
Copy link
Copy Markdown

/claim #29

Summary

  • Replaced the AdminPanelPage placeholder with a full admin operations console covering users, moderation, disputes, trust metrics, platform controls, and audit log.
  • Added a web route guard for /admin; non-admin sessions are rewritten to a 403 page.
  • Added server-side admin-role enforcement for every /api/admin/* route.
  • Added admin API routes for paginated/filterable users, moderation queue, disputes, controls, metrics, and audit logs.
  • Added mutation endpoints for user status changes, listing decisions, dispute rulings, and platform controls.
  • Added append-only audit logging plus notification side effects for rejected listings and dispute rulings.
  • Added focused API tests for non-admin denial, admin metrics/users, mutations, controls, and audit entries.

Validation

  • node --check apps/api/src/services/adminService.js; node --check apps/api/src/controllers/adminController.js; node --check apps/api/src/routes/adminRoutes.js; node --check apps/api/src/tests/admin.test.js
  • npm test
  • npm run build -w apps/web
  • git diff --cached --check

Notes

  • The implementation stays within the repo's current mock-data architecture rather than introducing a database migration.
  • The web admin surface uses seeded mock-service data for review, while the API enforces the real server-side admin JWT role check.
  • I could not attach a short demo video because this local environment does not have ffmpeg or ImageMagick available.

github-actions Bot added a commit that referenced this pull request May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant