How baliadventours/casplabali works
This is a tour and activities booking platform with customer-facing discovery and checkout, backed by a large staff operations suite for bookings, inventory, accounting, and NFC wristbands. The principal workflow is a customer browsing tours, submitting checkout, and receiving booking communications; staff then manage bookings and wristband operations. Groups distinguish storefront, operations, NFC and finance, and shared/server capabilities. Edges rely on the supplied excerpts and SOURCE INDEX; several broad subsystems are represented by their exact tree paths because their implementation was not sampled.
Main entry points: App.tsx Web app routing · Checkout.tsx Checkout · PluginContext.tsx Plugin capabilities · emailHandler.ts Email workflow
Components 30
Customer storefront
- Web app routing
src/App.tsx - Tour discovery
src/pages/Tours.tsx - Tour details
src/pages/TourDetail.tsx - Checkout
src/pages/Checkout.tsx - Booking confirmation
src/pages/BookingSuccess.tsx
Booking operations
- Staff administration
src/pages/Admin.tsx - Booking management
src/components/Admin/BookingManager.tsx - Manual booking
src/components/Admin/ManualBookingModal.tsx - Catalog inventory
src/components/Admin/InventoryManager.tsx
NFC operations
- Wristband reading
src/components/Admin/NfcReadView.tsx - Wristband helpers
src/components/Admin/nfcHubHelpers.ts - NFC parsing
src/lib/nfcEngine.ts
Finance and plugins
- Plugin capabilities
src/plugins/PluginContext.tsx - Commission rules
src/lib/commissionEngine.ts - Accounting tools
src/components/Admin/Accounting - Payout management
src/components/Admin/PayoutManager.tsx
Shared platform
- Firebase client
src/lib/firebase.ts - Firestore
- Email client
src/lib/emailService.ts - WhatsApp client
src/lib/whatsappService.ts - Email endpoint
api/send-email.ts - Email workflow
src/services/emailHandler.ts - Recipient resolution
src/services/email/recipientResolver.ts - Voucher generation
src/services/email/voucherGenerator.ts - Email transport
src/services/email/transporter.ts - Server routes
server.ts - WhatsApp endpoint
api/send-whatsapp.ts - WhatsApp workflow
src/services/whatsappHandler.ts
Other components
- Customer
- Email provider
Connections 32
- Customer → Web app routing: opens
src/App.tsx - Web app routing → Tour discovery: routes to
src/App.tsx - Web app routing → Tour details: routes to
src/App.tsx - Web app routing → Checkout: routes to
src/App.tsx - Web app routing → Staff administration: routes to
src/App.tsx - Checkout → Firebase client: reads and writes
src/pages/Checkout.tsx - Checkout → Email client: requests email
src/pages/Checkout.tsx - Checkout → WhatsApp client: requests WhatsApp
src/pages/Checkout.tsx - Checkout → Plugin capabilities: uses plugins
src/pages/Checkout.tsx - Firebase client → Firestore: connects
src/lib/firebase.ts - Staff administration → Booking management: manages bookings
- Booking management → Manual booking: opens
src/components/Admin/BookingManager.tsx - Booking management → Wristband reading: opens reader
src/components/Admin/BookingManager.tsx - Booking management → Firebase client: updates bookings
src/components/Admin/BookingManager.tsx - Catalog inventory → Firebase client: writes catalog
src/components/Admin/InventoryManager.tsx - Catalog inventory → Staff administration: is managed in
- Wristband reading → Wristband helpers: uses
- Wristband helpers → NFC parsing: uses
src/components/Admin/nfcHubHelpers.ts - Plugin capabilities → Wristband helpers: resolves wristbands
src/plugins/PluginContext.tsx - Plugin capabilities → NFC parsing: uses
src/plugins/PluginContext.tsx - Plugin capabilities → Commission rules: uses
src/plugins/PluginContext.tsx - Payout management → Commission rules: calculates payouts
src/components/Admin/PayoutManager.tsx - Payout management → Plugin capabilities: uses accounting plugin
src/components/Admin/PayoutManager.tsx - Staff administration → Accounting tools: offers accounting
- Email endpoint → Email workflow: dispatches
- Server routes → Email workflow: routes to
server.ts - Email workflow → Recipient resolution: resolves recipients
src/services/emailHandler.ts - Email workflow → Voucher generation: generates voucher
src/services/emailHandler.ts - Email workflow → Email transport: sends through
src/services/emailHandler.ts - Email transport → Email provider: sends email
- WhatsApp endpoint → WhatsApp workflow: dispatches
api/send-whatsapp.ts - Server routes → WhatsApp workflow: routes to
server.ts