How tafseelkhan/tizzygo-os works
The repository implements two related API products: TizzyGo commerce and TizzyOS marketplace/operations, including ride-hailing and shipping workflows. Requests enter through the separate application surfaces and expose domain routes; sampled routes show ride quoting and booking, while checkout/webhook code handles payment confirmation and order/cart state. TizzyOS also covers seller products, payout setup, riders, and fulfillment tracking. The map includes central runtime models, payment selection, and cleanup. Several route and controller internals were not sampled, so their connections are limited to explicitly shown mounts or references.
Main entry points: tizzyos/app.ts TizzyOS API · webhookController.ts Checkout and webhook · trackingServices.ts Shipping tracking · tizzygo/app.ts TizzyGo API
Components 28
API surfaces
- TizzyGo API
src/tizzygo/app.ts - TizzyOS API
src/tizzyos/app.ts
Commerce
- Commerce routes
src/routes/tizzygo - Authentication
src/middleware/tizzygo/authMiddleware.ts - Checkout and webhook
src/controller/tizzygo/buynow/webhookController.ts - Payment service
src/services/tizzygo/paymentService.ts - Gateway selection
src/factories/PaymentGatewayFactory.ts - Razorpay gateway
src/gateways/RazorpayGateway.ts - Cart data
src/models/tizzygo/cart/Cart.ts - Checkout and orders
src/models/tizzygo/checkout/order.ts - Transactions
src/models/tizzygo/checkout/Transaction.ts - Webhook events
src/models/tizzygo/checkout/WebhookEvent.ts
Ride-hailing
- Ride booking routes
src/routes/tizzyos/cab/rideBookingRoutes.ts - Ride quotes
src/services/tizzyos/cab/rideQuoteService.ts - Ride booking
src/services/tizzyos/cab/rideBookingService.ts - Driver dispatch
src/services/tizzyos/cab/rideDispatchService.ts
Seller and shipping
- Seller operations
src/routes/tizzyos/seller - Product catalog
src/models/tizzyos/seller/AddProducts/Products.ts - Shipping routes
src/routes/tizzyos/shipping - Shipping tracking
src/services/tizzyos/shippings/trackingServices.ts - FWS rider records
src/models/tizzyos/shipping/fws/fwsRegistration.ts - Rider locations
src/models/tizzyos/shipping/fws/fwsRiderLocation.ts - Delivery tracking
src/models/tizzyos/shipping/order/deliveryTracking.ts
Shared runtime
- Media cleanup
src/jobs/cronMediaCleanup.ts - Checkout cleanup
src/schedulers/cleanupScheduler.ts - Upload tracking
src/models/tizzyos/seller/AddProducts/MediaUploadTracker.ts - Seller logger
src/utils/tizzyos/seller/logger.ts
Other components
- Client apps
Connections 33
- Client apps → TizzyGo API: sends requests
src/tizzygo/app.ts - Client apps → TizzyOS API: sends requests
src/tizzyos/app.ts - TizzyGo API → Commerce routes: mounts routes
src/tizzygo/app.ts - TizzyOS API → Ride booking routes: mounts routes
src/tizzyos/app.ts - TizzyOS API → Seller operations: mounts routes
src/tizzyos/app.ts - TizzyOS API → Shipping routes: mounts routes
src/tizzyos/app.ts - Commerce routes → Authentication: guards requests
src/routes/tizzygo/social/shareRoutes.ts - Commerce routes → Checkout and webhook: routes webhook
- Checkout and webhook → Gateway selection: selects gateway
src/controller/tizzygo/buynow/webhookController.ts - Gateway selection → Razorpay gateway: registers gateway
src/factories/PaymentGatewayFactory.ts - Checkout and webhook → Webhook events: deduplicates events
src/controller/tizzygo/buynow/webhookController.ts - Checkout and webhook → Cart data: clears cart
src/controller/tizzygo/buynow/webhookController.ts - Checkout and webhook → Checkout and orders: reads and updates
src/controller/tizzygo/buynow/webhookController.ts - Payment service → Checkout and orders: reads and writes
src/services/tizzygo/paymentService.ts - Payment service → Cart data: reads and writes
src/services/tizzygo/paymentService.ts - Payment service → Transactions: reads and writes
src/services/tizzygo/paymentService.ts - Ride booking routes → Authentication: guards booking
src/routes/tizzyos/cab/rideBookingRoutes.ts - Ride booking routes → Ride quotes: requests quotes
- Ride booking routes → Ride booking: creates bookings
- Ride booking → Driver dispatch: dispatches drivers
- Seller operations → Product catalog: manages products
- Shipping routes → Shipping tracking: routes tracking
- Shipping tracking → Checkout and orders: reads orders
src/services/tizzyos/shippings/trackingServices.ts - Shipping tracking → FWS rider records: reads and writes
src/services/tizzyos/shippings/trackingServices.ts - Shipping tracking → Rider locations: reads and writes
src/services/tizzyos/shippings/trackingServices.ts - Shipping tracking → Delivery tracking: reads and writes
src/services/tizzyos/shippings/trackingServices.ts - Media cleanup → Upload tracking: cleans records
- Checkout cleanup → Checkout and orders: cleans abandoned orders
src/schedulers/cleanupScheduler.ts - Checkout cleanup → Transactions: cleans transactions
src/schedulers/cleanupScheduler.ts - TizzyGo API → Media cleanup: invokes cleanup
src/tizzygo/app.ts - TizzyGo API → Checkout cleanup: starts scheduler
src/tizzygo/app.ts - TizzyOS API → Media cleanup: invokes cleanup
src/tizzyos/app.ts - TizzyOS API → Checkout cleanup: starts scheduler
src/tizzyos/app.ts