Admin panel for the Broker-Social platform. Built on Next.js 16 + React 19 + Tailwind CSS 4.
Talks to bs-backend over HTTP and gates access to admin/super_admin role holders.
- Phone + OTP login via
bs-backend/auth - Admin role gate on
/(admin)routes - Dashboard with live KPIs (users, listings, leads, KYC, reports)
- Users — list, filter by role/status, change role, ban/unban
- Leads — full pipeline view with status counts
- KYC Verification — pending queue, approve/reject with note
- Moderation — open reports, action with internal note
- Node.js 18+
- A running
bs-backend(defaulthttp://localhost:3004/api) - A user in Mongo with
role: "admin"(orsuper_admin)
npm install
npm run devConfigure the API base URL via env (defaults to http://localhost:3004/api):
NEXT_PUBLIC_API_BASE_URL=http://localhost:3004/apiThere is no UI for the first promotion — do it directly in Mongo:
db.users.updateOne(
{ phone: "+91XXXXXXXXXX" },
{ $set: { role: "admin" } },
);After promotion, sign in via the regular phone+OTP flow.
src/
app/
(admin)/ # Auth-gated admin routes
(full-width-pages)/ # Sign-in / 404
components/
admin/ # Page-level admin components
dashboard/ # Dashboard tiles + recent leads
ui, form, common # Generic primitives
context/ # Auth + theme + sidebar providers
layout/ # AppHeader, AppSidebar, Backdrop
lib/api.ts # Token-aware fetch
services/ # One module per backend domain
The visual primitives (sidebar, header, badges, buttons, table, modal) come from the TailAdmin Next.js free template. All demo pages and ecommerce content have been removed.