Skip to content

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 in app/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) ​

  1. Route role gate (frontend). app/src/routes.tsx wraps the admin route group in <ProtectedRoute allowedRoles={['admin']}>. A non-admin never reaches /admin/*.
  2. 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_MANAGE or WHATSAPP_MANAGE). Without the entitlement the row renders locked.
  3. Backend middleware chain. Every admin API runs verifyJwt → requireRole("admin") → requireOrg (→ feature gate where applicable). requireOrg pins the request to the admin's own req.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.

⚠️ Unverified — the order and grouping below mirror the navItems array in AdminLayout.tsx; there is no screenshot to confirm the rendered layout.

Menu itemRouteEntitlement gateWhat 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/ticketsTICKETINGOrg-wide helpdesk view
Call Feedback/admin/feedback—Post-call feedback list + stats
User Insights/admin/user-insightsADMIN_ANALYTICSPer-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-configPAYMENTSRazorpay/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-configCRM_CONNECTER_MANAGE / WHATSAPP_MANAGEOrg BYO OAuth apps + default mappings
Settings/admin/settings—Org branding + general settings
Account Settings/admin/account—Admin's own account (bottom nav)

File Reference ​

FileRoleKey items
app/src/layouts/AdminLayout.tsxBuilds the admin sidebarnavItems, bottomNavItems
app/src/routes.tsxMaps /admin/* paths to pages, wraps the group in ProtectedRoute allowedRoles=['admin']admin route table
backend/client_backend/src/routes/admin.routes.tsCore 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.tsPer-customer provider enablement + customer ratesmounted at /admin/provisioning
backend/client_backend/src/routes/orgConfigReplica.routes.tsOrg pricing/preset replica (Config Management)mounted at /api/org-config
backend/client_backend/src/routes/payment.routes.tsAdmin payment-gateway config/admin/payment-config
backend/client_backend/src/routes/telephony.routes.tsAdmin phone-number inventory + assignment/admin/phone-numbers*
backend/client_backend/src/routes/userInsight.routes.tsUser Insights aggregates/api/v1/user-insights/*
backend/client_backend/src/routes/connecterAdmin.routes.tsOrg 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: 200 with the admin user, role admin, and the Organization used by ProtectedRoute and requireOrg.

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) ​

  1. Prerequisites: an admin account that owns an Organization, plus the client backend + frontend running.
  2. Log in as the admin and confirm you land on /admin/dashboard (a customer/superadmin login must not reach /admin/*).
  3. Confirm gated rows (Tickets, User Insights, Payment Gateway, Connecter) are hidden/locked when the org lacks the entitlement, and appear when it is granted.
  4. 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 ​

SymptomCauseFix
/admin/* redirects to loginLogged-in user is not role adminLog in with an admin account; see ProtectedRoute
Tickets / User Insights / Payment / Connecter row hiddenOrg lacks TICKETING / ADMIN_ANALYTICS / PAYMENTS / connecter entitlementGrant the feature at the superadmin level
API returns 403 with a valid admin loginrequireOrg found no org context, or the resource belongs to another orgEnsure the admin owns an Organization and the target customer is in it
Changes to pricing don't reach a customerConfig replica override not saved/propagatedRe-save in Config Management; see Org Dashboard

Last updated: