Org (Admin) Dashboard — Overview
The Org (Admin) dashboard is where an organization admin (a reseller/tenant owner) manages their own customers: provisioning them, pricing their usage, distributing credits, configuring signup and analysis defaults, and handling support feedback — all scoped to a single Organization.
No screenshots exist for this dashboard. It is documented from code: the sidebar comes from
app/src/layouts/AdminLayout.tsx, routes from the/admin/*group inapp/src/routes.tsx, and APIs from the backend route/controller files. Any UI-layout claim not confirmable from code is tagged> ⚠️ Unverified.
Architecture Overview
How Access Is Decided (Step-by-Step)
- Route role gate (frontend).
app/src/routes.tsxwraps the admin route group in<ProtectedRoute allowedRoles={['admin']}>. A non-admin never reaches/admin/*. - Entitlement gate (frontend). A few admin items are additionally wrapped in
<FeatureRoute features={[...]}>— Tickets (TICKETING), User Insights (ADMIN_ANALYTICS), Payment Gateway (PAYMENTS), and Connecter (CRM_CONNECTER_MANAGEorWHATSAPP_MANAGE). Without the entitlement the row renders locked. - Backend middleware chain. Every admin API runs
verifyJwt→requireRole("admin")→requireOrg(→ feature gate where applicable).requireOrgpins the request to the admin's ownreq.orgUID, so an admin can only ever read/write their own Organization and its customers.
Jargon: Organization = one tenant (a reseller/company) that owns many customer accounts. Admin role = the account owner of that Organization. Entitlement/feature = a paid capability toggled per org (superadmin → org). Replica config = the org's own copy of the superadmin default pricing/preset config it can override. See Feature Entitlements & Bundles and Team RBAC.
Sidebar Menu → What It Does
⚠️ Unverified — the order and grouping below mirror the
navItemsarray inAdminLayout.tsx; there is no screenshot to confirm the rendered layout.
| Menu item | Route | Entitlement gate | What it manages |
|---|---|---|---|
| Dashboard | /admin/dashboard | — | Org KPI landing (customers, credits, usage) |
| Customers | /admin/customers | — | Create/list/edit customers, KYC review, per-customer pricing & credits |
| Tickets | /admin/tickets | TICKETING | Org-wide helpdesk view |
| Call Feedback | /admin/feedback | — | Post-call feedback list + stats |
| User Insights | /admin/user-insights | ADMIN_ANALYTICS | Per-phone-number aggregated call analytics |
| Config Management | /admin/config | — | Org pricing/preset overrides (config replica) |
| Signup Config | /admin/signup-config | — | Self-serve signup form/plan defaults |
| Lead Field Templates | /admin/lead-field-templates | — | Industry lead-field templates seeded to customers |
| Analysis Schemas | /admin/analysis-schemas | — | Per-industry call-analysis schema definitions |
| Credits | /admin/credits | — | Distribute/revoke credits, org credit summary |
| Payment Gateway | /admin/payment-config | PAYMENTS | Razorpay/gateway config for customer top-ups |
| Phone Numbers | /admin/phone-numbers | — | Org number inventory, assign to customers |
| Number Provisioning | /admin/provisioning | — | Enable providers per customer, set customer rates |
| Connecter | /admin/connecter-config | CRM_CONNECTER_MANAGE / WHATSAPP_MANAGE | Org BYO OAuth apps + default mappings |
| Settings | /admin/settings | — | Org branding + general settings |
| Account Settings | /admin/account | — | Admin's own account (bottom nav) |
File Reference
| File | Role | Key items |
|---|---|---|
app/src/layouts/AdminLayout.tsx | Builds the admin sidebar | navItems, bottomNavItems |
app/src/routes.tsx | Maps /admin/* paths to pages, wraps the group in ProtectedRoute allowedRoles=['admin'] | admin route table |
backend/client_backend/src/routes/admin.routes.ts | Core admin API (customers, KYC, credits, org, signup, templates, analysis schemas, feedback) | router.use(verifyJwt, requireRole("admin"), requireOrg) |
backend/client_backend/src/routes/admin-provisioning.routes.ts | Per-customer provider enablement + customer rates | mounted at /admin/provisioning |
backend/client_backend/src/routes/orgConfigReplica.routes.ts | Org pricing/preset replica (Config Management) | mounted at /api/org-config |
backend/client_backend/src/routes/payment.routes.ts | Admin payment-gateway config | /admin/payment-config |
backend/client_backend/src/routes/telephony.routes.ts | Admin phone-number inventory + assignment | /admin/phone-numbers* |
backend/client_backend/src/routes/userInsight.routes.ts | User Insights aggregates | /api/v1/user-insights/* |
backend/client_backend/src/routes/connecterAdmin.routes.ts | Org BYO connecter apps | /api/v2/connecter/admin/* |
Data Model
The dashboard reads/writes collections scoped to the admin's Organization. Full schemas live in each section's source doc; see Data Collections for the complete map.
API Endpoints
The overview has no endpoints of its own; it relies on the auth session for role/org context. Each menu item's endpoints are enumerated in Org Dashboard — Sections & APIs.
Current admin + org context
- Method:
GET - Path:
/auth/me - Auth:
verifyJwt - Response:
200with the admin user, roleadmin, and the Organization used byProtectedRouteandrequireOrg.
External Integrations
None at the overview level. Section-level integrations: Razorpay (Payment Gateway), telephony providers (Number Provisioning / Phone Numbers), and CRM/WhatsApp OAuth providers (Connecter). Covered in Org Dashboard.
How to Test (End-to-End)
- Prerequisites: an admin account that owns an Organization, plus the client backend + frontend running.
- Log in as the admin and confirm you land on
/admin/dashboard(acustomer/superadminlogin must not reach/admin/*). - Confirm gated rows (Tickets, User Insights, Payment Gateway, Connecter) are hidden/locked when the org lacks the entitlement, and appear when it is granted.
- Open each menu item and confirm the landing API returns
200(no 403 in the network tab) and that data is limited to your own org's customers.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
/admin/* redirects to login | Logged-in user is not role admin | Log in with an admin account; see ProtectedRoute |
| Tickets / User Insights / Payment / Connecter row hidden | Org lacks TICKETING / ADMIN_ANALYTICS / PAYMENTS / connecter entitlement | Grant the feature at the superadmin level |
| API returns 403 with a valid admin login | requireOrg found no org context, or the resource belongs to another org | Ensure the admin owns an Organization and the target customer is in it |
| Changes to pricing don't reach a customer | Config replica override not saved/propagated | Re-save in Config Management; see Org Dashboard |