How priyadarsh912/busconnect1 works
BusConnect is a mobile-oriented transit app for discovering routes and nearby buses, tracking live vehicles, and booking tickets, with separate administration and offline synchronization capabilities. Its user workflow begins in the routed React app, proceeds through route search and booking, and presents confirmation or a ticket; real-time discovery and radar provide parallel transit features. The README documents the geo-query and radar behavior, while sampled source confirms selected route, crowd-prediction, authentication, and sync calls. Several page and service implementations were not sampled, so their internal wiring is shown only where documented.
Main entry points: App.tsx React app and routes · RouteSearchPage.tsx Route search · supabase.ts Supabase data · authService.ts Authentication service
Components 23
App and identity
- React app and routes
src/App.tsx - Authentication service
src/services/authService.ts
Route discovery
- Route search
src/pages/RouteSearchPage.tsx - Bus and route service
src/services/busService.ts - Delhi UP route loader
src/data/loadDelhiUPRoutes.ts - Connecting-route finder
src/utils/ConnectingRouteFinder.ts
Ticket booking
- Ticket booking
src/pages/BookTicketPage.tsx - Seat selection
src/pages/SeatSelectionPage.tsx - Payment
src/pages/CardPaymentPage.tsx - Booking confirmation
src/pages/ConfirmationPage.tsx
Live transit
- Nearby bus geo-query
src/services/nearbyBusService.ts - Nearby bus hook
src/hooks/useNearbyBuses.ts - Highway radar
src/pages/HighwayRadarPage.tsx - Live radar wrapper
src/pages/LiveRadarWrapper.tsx - Live bus subscription
src/hooks/useSupabaseLiveBuses.ts - Crowd prediction
src/utils/CrowdPredictionEngine.ts
Operations and sync
- Admin dashboard
src/pages/admin/AdminDashboardPage.tsx - Admin data service
src/services/adminService.ts - Offline services
src/services/offline/OfflineBusService.ts - Offline sync engine
src/services/offline/SyncEngine.ts
Other components
- Rider
- Firebase Auth and Firestore
- Supabase data
src/lib/supabase.ts
Connections 21
- Rider → React app and routes: uses
- React app and routes → Route search: routes to
- React app and routes → Ticket booking: routes to
- React app and routes → Highway radar: routes to
- React app and routes → Admin dashboard: routes to
- Authentication service → Firebase Auth and Firestore: authenticates
- Authentication service → Bus and route service: syncs profile
- Route search → Bus and route service: loads routes
- Route search → Connecting-route finder: finds connections
- Delhi UP route loader → Rider: returns route data
- Nearby bus hook → Nearby bus geo-query: queries nearby
- Nearby bus geo-query → Firebase Auth and Firestore: geo-queries
- Highway radar → Live radar wrapper: shows live overlay
- Live bus subscription → Supabase data: subscribes to buses
- Crowd prediction → Supabase data: reads history
- Ticket booking → Seat selection: selects seats
- Seat selection → Payment: continues booking
- Payment → Booking confirmation: confirms booking
- Admin dashboard → Admin data service: loads admin data
- Offline services → Offline sync engine: queues offline work
- Offline sync engine → Supabase data: syncs records