Admin
The TrackMe admin dashboard, its JSON API, role-scoped navigation, and operator action map.
The admin area has two separate surfaces:
- Admin JSON API under
/api/v1/admin/*, plus per-domain admin JSON endpoints such as/api/v1/admin/food-trucks,/api/v1/admin/jobs,/api/v1/admin/payment-orders, and/api/v1/admin/support/tickets. These routes use Bearer auth and the admin role gate. They appear in the API reference. - Admin SPA under
/admin/*. It is React rendered through Inertia, uses the web session after/admin/login, and drives mutations through cookie-authenticated web routes. These HTML routes are intentionally excluded from OpenAPI, so this section documents them.
Surfaces & auth
Route families, guards, shared props, lookups, uploads, and how OpenAPI relates to the admin SPA.
Dashboard & navigation
Role scopes, dashboard widgets, realtime refreshes, sidebar groups, and badge counts.
Pages & actions
Every admin page group and the mutations wired from the React dashboard.
Admin API reference
Generated request/response schemas for bearer-authenticated admin JSON endpoints.
What counts as admin
The admin guide covers the operator workflow: dashboard metrics, user and truck moderation, reports/reviews/menu moderation, jobs and marketplace oversight, support, payments, refunds, webhooks, pricing, orders, administrators, announcements, notifications, activity, security, queues, legal, FAQs, about content, and settings.
The mobile flow guides still explain customer and owner task sequences. Use the admin guide when the same entity is being managed by an operator, because the admin surface often has wider filters, bulk actions, audit requirements, and role gates that do not exist in the mobile app.
Source of truth
The admin route contract is split across:
| Source | What it owns |
|---|---|
app/modules/admin/routes.ts | Cross-cutting admin JSON routes, /admin/* page renders, account/users/admins/settings/security/actions. |
| Domain route files | Admin JSON/web actions for trucks, jobs, marketplace, reviews, reports, payments, categories, support, legal, and about content. |
inertia/shell/sidebar-nav-config.ts | Sidebar groups, item order, section gates, explicit role gates, and badge keys. |
shared/admin/scope.ts | Dashboard section enum and role-to-section matrix. |
shared/admin/dashboard.ts | The /admin/dashboard Inertia payload contract. |
When the generated API reference and this guide disagree, check the backend source above first, then regenerate the OpenAPI snapshot.
Owner Dashboard, Analytics & Payouts
Read-only KPIs, charts, per-resource drill-downs, and a weekly payouts view computed live from paid orders — there is no payouts table and nothing to "request".
Surfaces & Auth
How admin routes are split between bearer JSON endpoints and the cookie-authenticated Inertia dashboard.