How layvanntha-glitch/wheelroadshow_bot works
WheelRoadShow is a workshop-management system with an admin console and a shared customer storefront available on the web or in Telegram. Customers browse products, book service, place orders, and track them; staff manage counter sales, inventory, jobs, returns, expenses, reports, and team access. Both surfaces use a typed API backed by SQLite, with Telegram messaging and live events as supporting capabilities. Edges reflect README statements and shown imports/calls; several README-documented subsystems have unsampled implementation details.
Main entry points: orders.service.ts Orders and sales · crm.repo.ts Customer and order data · routes Express routes · jobs.service.ts Service bay
Components 24
User surfaces
- Admin console
src/admin - Storefront
src/telegram - Typed endpoints
src/api/endpoints.ts - Fetch client
src/api/client.ts
HTTP API
- Express routes
server/routes - Authentication routes
server/routes/auth.routes.ts
Business services
- Authentication
server/services/auth.service.ts - Stock integrity
server/services/inventory.service.ts - Orders and sales
server/services/orders.service.ts - Service bay
server/services/jobs.service.ts - Reports
server/services/reports.service.ts - Returns
server/services/returns.service.ts - Telegram updates
server/services/telegram-updates.service.ts
Persistence
- SQLite database
server/db/client.ts - Customer and order data
server/db/repos/crm.repo.ts - Product data
server/db/repos/products.repo.ts - Job data
server/db/repos/jobs.repo.ts - Transaction data
server/db/repos/transactions.repo.ts
Shared runtime
- Live event bus
server/lib/events.ts - Telegram client
server/lib/telegram.ts - Shared contracts
shared/types.ts
Other components
- Customer
- Shop staff
- Telegram platform
Connections 36
- Customer → Storefront: browses and books
- Shop staff → Admin console: runs workshop
- Storefront → Typed endpoints: requests data
src/telegram/MiniApp.tsx - Admin console → Typed endpoints: uses API
src/admin/JobsPage.tsx - Typed endpoints → Fetch client: calls
src/api/endpoints.ts - Fetch client → Express routes: sends HTTP
- Express routes → Authentication: delegates auth
server/routes/auth.routes.ts - Authentication routes → Authentication: calls
server/routes/auth.routes.ts - Authentication → Customer and order data: reads and updates
server/services/auth.service.ts - Authentication → SQLite database: issues signed sessions
- Express routes → Stock integrity: delegates stock
server/routes/catalog.routes.ts - Express routes → Orders and sales: delegates orders
server/routes/crm.routes.ts - Express routes → Service bay: changes job status
server/routes/jobs.routes.ts - Service bay → Job data: reads and writes jobs
server/services/jobs.service.ts - Service bay → Stock integrity: completes with stock
server/services/jobs.service.ts - Service bay → Customer and order data: records customer messages
server/services/jobs.service.ts - Orders and sales → Customer and order data: reads and writes orders
server/services/orders.service.ts - Orders and sales → Product data: reads product prices
server/services/orders.service.ts - Orders and sales → Stock integrity: draws down stock
server/services/orders.service.ts - Reports → Customer and order data: reads sales data
server/services/reports.service.ts - Reports → Product data: reads product data
server/services/reports.service.ts - Reports → Transaction data: reads transactions
server/services/reports.service.ts - Stock integrity → Product data: updates stock
- Customer and order data → SQLite database: executes SQL
server/db/repos/crm.repo.ts - Product data → SQLite database: executes SQL
server/db/repos/products.repo.ts - Job data → SQLite database: executes SQL
server/db/repos/jobs.repo.ts - Live event bus → Customer: streams updates
- Orders and sales → Live event bus: broadcasts changes
server/services/orders.service.ts - Service bay → Live event bus: broadcasts changes
server/services/jobs.service.ts - Telegram updates → Customer and order data: handles conversations
server/services/telegram-updates.service.ts - Telegram updates → Orders and sales: processes order updates
server/services/telegram-updates.service.ts - Telegram updates → Telegram client: sends notifications
server/services/telegram-updates.service.ts - Telegram client → Telegram platform: calls bot API
server/lib/telegram.ts - Storefront → Telegram platform: runs as Mini App
- Shared contracts → Admin console: defines shared types
- Shared contracts → Storefront: defines shared types