How msr82302-arch/xero works
XeroTech’s application combines a public technology-services portfolio and estimator with an XBMS back office for staff billing and administration. The main workflow runs from public service selection or staff receipt entry through the API and server-side receipt handling, with receipts available for preview and PDF download. Authentication gates administrative and staff functions; quotations, client records, users, settings, and audit logs form distinct supporting capabilities. The excerpts and source index support key calls and imports, but do not expose every route or storage implementation, so uncertain wiring is omitted.
Main entry points: App.tsx Application routes · api.ts API client · CreateReceiptModal.tsx Receipt issuance · xbmsRoutes.ts XBMS API routes
Components 24
Public portfolio
- Application routes
src/App.tsx - Service catalog
src/data/services.ts - Portfolio sections
src/components/sections/AiStudioSection.tsx - Service selector
src/components/sections/ServicesGrid.tsx - Estimate builder
src/components/modals/EstimatorModal.tsx
Identity and access
- Staff login
src/pages/auth/LoginPage.tsx - Auth session
src/context/AuthContext.tsx - Role guard
src/components/auth/ProtectedRoute.tsx - Staff account access
src/components/auth/StaffReactivatePanel.tsx - User administration
src/pages/admin/UsersPage.tsx
Billing operations
- Staff terminal
src/pages/terminal/StaffTerminalPage.tsx - Quick biller
src/components/terminal/QuickBillerForm.tsx - Receipt issuance
src/components/admin/CreateReceiptModal.tsx - Receipt preview
src/components/admin/ReceiptPreviewModal.tsx - Admin dashboard
src/pages/admin/DashboardPage.tsx - Admin records
src/pages/admin/ReceiptsLedgerPage.tsx - Quotation management
src/pages/admin/QuotationsPage.tsx - Client directory
src/pages/admin/ClientsPage.tsx
XBMS backend
- API client
src/lib/api.ts - HTTP server
server.ts - XBMS API routes
server/xbmsRoutes.ts - XBMS state store
server/xbmsStore.ts - Receipt PDF generator
server/xbmsPdf.ts
Other components
- Visitor / staff
Connections 27
- Visitor / staff → Application routes: opens
- Application routes → Portfolio sections: renders
src/App.tsx - Application routes → Service selector: renders
src/App.tsx - Service selector → Service catalog: reads catalog
src/components/sections/ServicesGrid.tsx - Application routes → Estimate builder: opens
src/App.tsx - Estimate builder → Service catalog: reads catalog
src/components/modals/EstimatorModal.tsx - Application routes → Staff login: routes to
src/App.tsx - Application routes → Role guard: guards routes
src/App.tsx - Staff login → Auth session: uses session
src/pages/auth/LoginPage.tsx - Role guard → Auth session: checks role
src/components/auth/ProtectedRoute.tsx - Auth session → API client: sends auth requests
src/context/AuthContext.tsx - Staff terminal → Quick biller: renders
src/pages/terminal/StaffTerminalPage.tsx - Quick biller → API client: submits billing
src/components/terminal/QuickBillerForm.tsx - User administration → Staff account access: supports reactivation
- User administration → API client: sends user requests
src/pages/admin/UsersPage.tsx - Receipt issuance → API client: issues receipt
src/components/admin/CreateReceiptModal.tsx - Admin records → Receipt issuance: opens issuance
src/pages/admin/ReceiptsLedgerPage.tsx - Admin records → Receipt preview: opens preview
src/pages/admin/ReceiptsLedgerPage.tsx - Admin dashboard → Receipt issuance: opens issuance
src/pages/admin/DashboardPage.tsx - Admin dashboard → Receipt preview: opens preview
src/pages/admin/DashboardPage.tsx - Quotation management → Receipt issuance: opens issuance
src/pages/admin/QuotationsPage.tsx - Client directory → Receipt issuance: opens issuance
src/pages/admin/ClientsPage.tsx - Receipt preview → API client: downloads PDF
src/components/admin/ReceiptPreviewModal.tsx - API client → XBMS API routes: calls API
- HTTP server → XBMS API routes: mounts routes
server.ts - XBMS API routes → XBMS state store: uses state store
server/xbmsRoutes.ts - XBMS API routes → Receipt PDF generator: generates receipt PDF
server/xbmsRoutes.ts