How t-glonk/24ct1-tran_quoc_trung works
Alobo Sport is a badminton-court booking and management system: customers discover courts, book and pay, while staff administer bookings, courts, customers, services, transactions, and reports. The mobile app uses shared context and API clients to reach an Express backend; the backend persists domain data in a file-backed store. The README also documents map, favorites, membership, POS, and reporting capabilities. Some links below reflect README-level capabilities because their implementing source was not sampled; a legacy root-level screen set is shown separately rather than assumed to be part of the modular app.
Main entry points: index.js REST routes · AppNavigator.js Screen navigation · AppContext.js App state · apiClient.js API client
Components 33
Mobile app
- App shell
frontend/App.js - App state
frontend/src/context/AppContext.js - Screen navigation
frontend/src/navigation/AppNavigator.js - API client
frontend/src/api/apiClient.js - Auth API
frontend/src/api/authApi.js - Booking API
frontend/src/api/bookingApi.js - Court API
frontend/src/api/courtApi.js - Service API
frontend/src/api/serviceApi.js - Report API
frontend/src/api/reportApi.js
Customer booking
- Sign in / register
frontend/src/screens/auth/LoginScreen.js - Court discovery
frontend/src/screens/customer/HomeScreen.js - Booking and payment
frontend/src/screens/customer/BookingScreen.js - Customer account
frontend/src/screens/customer/AccountScreen.js - Court map
frontend/src/screens/map/MapScreen.js
Admin operations
- Admin modules
frontend/src/screens/admin - Service POS
frontend/src/screens/admin/AdminServicesScreen.js
Backend API
- Express server
backend/src/server.js - REST routes
backend/src/routes/index.js - Booking handling
backend/src/controllers/bookingController.js - Court handling
backend/src/controllers/courtController.js - Customer handling
backend/src/controllers/customerController.js - Service handling
backend/src/controllers/serviceController.js - Authentication
backend/src/controllers/authController.js - Reports
backend/src/controllers/reportController.js - Transactions
backend/src/controllers/transactionController.js
Persistence
- File-backed store
backend/src/config/db.js - Seed records
backend/src/data/courts.js
Legacy screens
- Legacy customer screens
src/CustomerScreens.js - Legacy admin screens
src/AdminScreens.js - Legacy sample data
src/data.js - Legacy map
src/MapScreen.js
Other components
- Customer
- Admin staff
Connections 38
- Customer → App shell: opens
README.md - Admin staff → App shell: opens
README.md - App shell → App state: provides state
frontend/App.js - App shell → Screen navigation: renders
frontend/App.js - Screen navigation → Sign in / register: routes to
frontend/src/navigation/AppNavigator.js - Screen navigation → Court discovery: routes to
frontend/src/navigation/AppNavigator.js - Screen navigation → Booking and payment: routes to
frontend/src/navigation/AppNavigator.js - Screen navigation → Customer account: routes to
frontend/src/navigation/AppNavigator.js - Screen navigation → Court map: routes to
frontend/src/navigation/AppNavigator.js - Screen navigation → Admin modules: routes to
frontend/src/navigation/AppNavigator.js - App state → Auth API: calls
frontend/src/context/AppContext.js - App state → Booking API: calls
frontend/src/context/AppContext.js - App state → Court API: calls
frontend/src/context/AppContext.js - App state → Service API: calls
frontend/src/context/AppContext.js - App state → Report API: calls
frontend/src/context/AppContext.js - Service POS → Service API: checks out
frontend/src/screens/admin/AdminServicesScreen.js - Auth API → API client: requests through
frontend/src/api/authApi.js - Booking API → API client: requests through
frontend/src/api/bookingApi.js - Court API → API client: requests through
frontend/src/api/courtApi.js - Service API → API client: requests through
frontend/src/api/serviceApi.js - API client → Express server: HTTP requests
README.md - Express server → REST routes: mounts
backend/src/server.js - REST routes → Booking handling: dispatches
- REST routes → Court handling: dispatches
- REST routes → Customer handling: dispatches
- REST routes → Authentication: dispatches
README.md - REST routes → Service handling: dispatches
README.md - REST routes → Reports: dispatches
README.md - REST routes → Transactions: dispatches
README.md - Booking handling → File-backed store: reads and writes
backend/src/controllers/bookingController.js - Court handling → File-backed store: uses
backend/src/controllers/courtController.js - Customer handling → File-backed store: uses
backend/src/controllers/customerController.js - Service handling → File-backed store: uses
backend/src/controllers/serviceController.js - File-backed store → Seed records: loads seeds
backend/src/config/db.js - Legacy customer screens → Legacy sample data: uses
src/CustomerScreens.js - Legacy customer screens → Legacy map: uses
src/CustomerScreens.js - Legacy admin screens → Legacy sample data: uses
src/AdminScreens.js - Legacy map → Legacy sample data: uses
src/MapScreen.js