SpatioViewAdmin (TicketAdmin)
Ticketing admin portal. Internally this is "TicketAdmin" — the repo
was renamed but its own package.json still says vite_react_shadcn_ts
(starter-template name, never updated) and homepage: "/ticket-admin",
neither of which matches the real /spatio base path actually used
(vite.config.ts, App.tsx). Don't trust the repo's own metadata over
its actual routing code.
Overview
React 18 + TypeScript, Vite 5, react-router-dom 6, Tailwind + shadcn/radix, Zustand, TanStack Query + react-table, react-hook-form + zod, axios, tiptap (rich text), recharts, dnd-kit, exceljs/jspdf (export).
Main sections
From App.tsx's routes and the sidebar nav (role-gated SYSADMIN/ADMIN):
- Dashboard, Orders, Customers
- Products — ticket-group CRUD
- Service Portal — a tabbed page combining Home Banners and Rail Menu (there is no standalone Gallery feature or page, despite that sometimes being assumed)
- Manage Tags (SYSADMIN-only)
- Analytics dashboard, Reports (Sales/User-Activity/Financial)
- Notifications
- Settings (SYSADMIN-only) — General, FAQ, Privacy/Refund/Terms policies, Contact Us, and Integration (the per-product POS/payment profile picker — profiles themselves are created in OrgConsole)
- Manage Account
Auth
Genuinely dual-path today, both converging on the same session resolution:
LoginForm.tsx posts directly to AuthAPI, then resolves the session via
identityService.getMe() → findSpatioWorkspaceRole(). The hosted TellyID
/sso/callback route does the same resolution after redirect — it's a
real, live route now, not dead code.
Running locally
npm run dev # Vite dev server, fixed port 13001, host 0.0.0.0, HMR disabled
Env vars
No .env.example — only a real .env.local:
| Var | Notes |
|---|---|
VITE_API_BASE_URL |
Required — throws in dev if unset |
VITE_CORE_API_URL |
Falls back to VITE_API_BASE_URL if unset |
VITE_AUTH_API_URL / VITE_AUTH_URL |
AuthAPI base / login redirect |
VITE_SPATIO_WORKSPACE_ID |
Picks which entry in /identity/users/me's org.workspaces[] represents this app — must match CoreAPI's SPATIO_TICKETING_WORKSPACE_ID exactly, or role resolution silently picks the wrong workspace |
Recently migrated to real workspace-scoping (2026-09-14)
Unlike OrgConsole/PlatformConsole, this app has already been updated to
send a real workspaceId on writes — ticketGroup, tag/banner, rail-menu,
order-management, notification, and settings admin calls all moved from
flat/legacy paths to CoreAPI's new RequireWorkspacePermission-gated
workspace-scoped endpoints. See the Domain doc's
Multi-tenancy section for the backend side of
this migration.
⚠️ Known issue: broken README
README.md's very first line is a literal unresolved git merge-conflict
marker (<<<<<<< HEAD) followed by # ticketadmin — never cleaned up
after a past merge. A new developer opening it first sees raw conflict
markers, not documentation. Use this page instead until someone fixes it.
See Changelog for real, dated feature history.