Admin frontend source map
A lookup table for "where is the code that does X". Keep it open for your first week — nobody memorises this, and there's no prize for guessing.
The main entry points
| What you're looking for | Where it lives |
|---|---|
| Route definition | src/router.tsx |
| Session and role gate | src/routes/admin/AdminRoute.tsx |
| Resource vocabulary | src/features/admin/core/resource.ts |
| Sidebar and navigation tree | src/features/admin/core/navigation.ts |
| Shell snapshot dispatch | src/features/admin/core/workspace.ts |
| Shell renderer | src/features/admin/components/AdminShellSaas.tsx |
| Typed admin HTTP calls | src/features/admin/api.ts |
| Query and mutation composition | src/features/admin/bridge.ts, hooks.ts, hooksRoute.ts, hooksSupport.ts |
| MSW fixtures (fake API for tests and screenshots) | src/test/msw/handlers.ts, src/test/msw/fixtures/ |
| Browser contract tests | tests/e2e/admin-shell.spec.ts, tests/e2e/admin-browser-gaps.spec.ts |
Which file owns which screen
| Screen | Main source |
|---|---|
| Overview and generic dispatch | core/workspace.ts |
| Players, wallet, and rewards | core/workspaces/users.ts, core/workspaces/player360.ts |
| Deposits and withdrawals | core/workspaces/payments.ts, paymentDetailPanels.ts |
| Provider health and capabilities | core/workspaces/providers.ts, components/kit/ProviderHealthPanel.tsx |
| Support | src/features/admin-support/ |
| Growth | src/features/admin-growth/ |
| Business and player reports | core/workspaces/reporting.ts |
| Transfers and reconciliation | core/workspaces/transfers.ts |
| System ledger | core/workspaces/ledger.ts |
| Game links | features/admin-game-links/GameLinksWorkspace.tsx |
| Testers and admins | components/AdminTestersWorkspace.tsx, AdminAdminsWorkspace.tsx |
Adding or changing an admin operation
The order matters here. Each step depends on the one before it, and doing them out of sequence means redoing work.
- Change PlayGo first — the OpenAPI definition and the backend behaviour. The backend owns the contract, so there's nothing to build against until it exists.
- Regenerate the client with
pnpm openapi, which rewritessrc/generated/playgo/openapi.generated.ts. Don't hand-edit generated files; the next regeneration will discard your changes. - Add the typed API call, then the bridge mutation or query.
- Write the pure snapshot and state tests before the renderer. The pure layer is where the logic actually is, and it's far cheaper to test there than through a rendered component.
- Update the semantic debug targets for any meaningful stateful seam.
- Update the operator docs — both the reference page and the recipe that owns the action. If an operator's steps changed and the handbook still describes the old flow, the feature isn't finished. Those pages are written in plain language for non-technical staff, so match that register rather than this one.
- Regenerate screenshots only if the visible workflow actually changed. See Local docs and screenshot workflow.
- Run the gates:
pnpm docs:checkand the usualpnpm check.
Step 6 is the one people skip when they're in a hurry. It's also the one that leaves a support agent following instructions that no longer match the screen in front of them — at the moment they're trying to help someone with their money.