Skip to content

feat: implement full admin panel with 6 sections#64

Open
capa8795-design wants to merge 1 commit into
SecureBananaLabs:mainfrom
capa8795-design:admin-panel
Open

feat: implement full admin panel with 6 sections#64
capa8795-design wants to merge 1 commit into
SecureBananaLabs:mainfrom
capa8795-design:admin-panel

Conversation

@capa8795-design
Copy link
Copy Markdown

Summary

Replace the placeholder AdminPanelPage with a fully functional admin panel covering 8 sections as specified in the requirements.

Changes

Backend (Express API)

  • 15 new API endpoints under /api/admin/:
    • User management (list, detail, suspend, reinstate, ban)
    • Job moderation queue (list flagged, approve, reject with reason)
    • Dispute resolution (list, detail, issue ruling)
    • Platform controls (get, update registration/job posting toggles)
    • Audit log (filterable by admin, action, date range)
  • In-memory data store with 8 mock users, 8 jobs, 3 disputes
  • Dev login endpoint (POST /api/admin/dev-login) for local testing

Frontend (Next.js)

  • 6-tab admin panel with navigation:
    • Dashboard — summary cards + trust score distribution chart
    • Users — searchable/filterable table with suspend/ban/reinstate
    • Moderation — flagged jobs queue with approve/reject (confirmation dialog)
    • Disputes — dispute cards with message threads, evidence viewer, ruling interface
    • Controls — platform toggles with confirmation dialogs, audit-logged changes
    • Audit Log — filterable log of all admin actions
  • JWT-based auth — admin login generates token, stored in localStorage
  • Loading, empty, error states handled for every section
  • Dark theme matching existing design system

Modified files

  • apps/api/src/routes/adminRoutes.js — +dev-login, +14 new routes
  • apps/api/src/controllers/adminController.js — 14 new controller functions
  • apps/api/src/services/adminService.js — full in-memory data layer
  • apps/web/app/admin/page.tsx — full 6-tab interface (~560 lines)

New files

  • apps/web/app/admin/admin.css — admin-specific styles (~120 lines)

Closes #29

@BossChaos
Copy link
Copy Markdown

Code Review

PR: feat: implement full admin panel with 6 sections by @capa8795-design

  • 🔒 Admin panel — needs security review

Wallet: 0xdaE5d307339074A24F579dB48e7c639359D94904

Code review for SecureBananaLabs bug-bounty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement a fully functional Admin Panel

2 participants