Skip to main content

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 forWhere it lives
Route definitionsrc/router.tsx
Session and role gatesrc/routes/admin/AdminRoute.tsx
Resource vocabularysrc/features/admin/core/resource.ts
Sidebar and navigation treesrc/features/admin/core/navigation.ts
Shell snapshot dispatchsrc/features/admin/core/workspace.ts
Shell renderersrc/features/admin/components/AdminShellSaas.tsx
Typed admin HTTP callssrc/features/admin/api.ts
Query and mutation compositionsrc/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 teststests/e2e/admin-shell.spec.ts, tests/e2e/admin-browser-gaps.spec.ts

Which file owns which screen​

ScreenMain source
Overview and generic dispatchcore/workspace.ts
Players, wallet, and rewardscore/workspaces/users.ts, core/workspaces/player360.ts
Deposits and withdrawalscore/workspaces/payments.ts, paymentDetailPanels.ts
Provider health and capabilitiescore/workspaces/providers.ts, components/kit/ProviderHealthPanel.tsx
Supportsrc/features/admin-support/
Growthsrc/features/admin-growth/
Business and player reportscore/workspaces/reporting.ts
Transfers and reconciliationcore/workspaces/transfers.ts
System ledgercore/workspaces/ledger.ts
Game linksfeatures/admin-game-links/GameLinksWorkspace.tsx
Testers and adminscomponents/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.

  1. 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.
  2. Regenerate the client with pnpm openapi, which rewrites src/generated/playgo/openapi.generated.ts. Don't hand-edit generated files; the next regeneration will discard your changes.
  3. Add the typed API call, then the bridge mutation or query.
  4. 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.
  5. Update the semantic debug targets for any meaningful stateful seam.
  6. 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.
  7. Regenerate screenshots only if the visible workflow actually changed. See Local docs and screenshot workflow.
  8. Run the gates: pnpm docs:check and the usual pnpm 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.