Skip to content

Add functional admin panel#61

Closed
sypham98-prog wants to merge 1 commit into
SecureBananaLabs:mainfrom
sypham98-prog:codex/admin-panel-29
Closed

Add functional admin panel#61
sypham98-prog wants to merge 1 commit into
SecureBananaLabs:mainfrom
sypham98-prog:codex/admin-panel-29

Conversation

@sypham98-prog
Copy link
Copy Markdown

/claim #29

Summary

  • Replaced the placeholder admin page with a guarded operations panel covering metrics, trust distribution, users, moderation, disputes, platform controls, and audit logs.
  • Added server-side admin authorization to every /api/admin/* route and implemented paginated/filterable admin endpoints.
  • Added admin actions for user suspension/reinstatement/bans, listing moderation decisions, dispute rulings/refunds/escalation, control toggles with confirmation, notifications, and append-only audit entries.
  • Added detail views for user profiles, active jobs, dispute history, dispute thread/evidence, and transaction data.

Validation

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

Demo walkthrough

  1. Start the API and web app locally.
  2. Use an admin JWT containing role: "admin" as ff_access_token, then open /admin.
  3. Refresh the dashboard, filter users/audit logs, view a user profile, moderate a flagged listing, inspect a dispute, issue a ruling/refund, and toggle platform controls.
  4. Confirm each action appears in the audit log.

Notes

  • Non-admin requests are redirected from /admin and rejected by the API with 403.
  • This implementation is scoped to the repository's current mock/in-memory service architecture.
  • AI assistance was used to implement and validate this PR.

github-actions Bot added a commit that referenced this pull request May 17, 2026
@sypham98-prog
Copy link
Copy Markdown
Author

Withdrawing this PR from my active bounty queue because the bounty instructions require a short demo video, and I am filtering out video-required bounties going forward. Thanks for the review.

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