How t-glonk/24ct1-tran_quoc_trung-cnpm works
Alobo Sport is a badminton-court booking and management system: customers discover venues, select a court and time, confirm add-on services, and pay; staff administer bookings, courts, customers, POS inventory, transactions, and reports. The mobile app centralizes state and calls an Express REST API, whose controllers use a MySQL connection and a persistent JSON cache. Screen-to-API details and some backend internals were not sampled, so documented relationships are cited to the README; uncertain links are omitted.
Main entry points: index.js API routes · mysql.js MySQL pool · AppNavigator.js App navigation · App.js App root
Components 24
Mobile app
- App root
frontend/App.js - App navigation
frontend/src/navigation/AppNavigator.js - App state
frontend/src/context/AppContext.js - Auth screens
frontend/src/screens/auth/LoginScreen.js - Customer booking
frontend/src/screens/customer/BookingScreen.js - Venue map
frontend/src/screens/map/MapScreen.js - Admin screens
frontend/src/screens/admin/AdminHomeScreen.js - HTTP client
frontend/src/api/apiClient.js - Auth API
frontend/src/api/authApi.js - Service API
frontend/src/api/serviceApi.js
REST API
- Express server
backend/src/server.js - API routes
backend/src/routes/index.js
Booking and operations
- Authentication
backend/src/controllers/authController.js - Court management
backend/src/controllers/courtController.js - Booking management
backend/src/controllers/bookingController.js - Customer CRM
backend/src/controllers/customerController.js - POS and services
backend/src/controllers/serviceController.js - Transactions and reports
backend/src/controllers/reportController.js - Sync and health
backend/src/controllers/syncController.js
Persistence
- Cache and sync store
backend/src/config/db.js - MySQL pool
backend/src/config/mysql.js
Other components
- Customer
- Admin or staff
- MySQL database
Connections 31
- Customer → App root: uses
README.md - Admin or staff → App root: uses
README.md - App root → App state: provides state
frontend/App.js - App root → App navigation: renders
frontend/App.js - App navigation → Auth screens: routes to
frontend/src/navigation/AppNavigator.js - App navigation → Customer booking: routes to
frontend/src/navigation/AppNavigator.js - App navigation → Venue map: routes to
frontend/src/navigation/AppNavigator.js - App navigation → Admin screens: routes to
frontend/src/navigation/AppNavigator.js - App state → Auth API: calls
frontend/src/context/AppContext.js - App state → Service API: calls
frontend/src/context/AppContext.js - Auth API → HTTP client: requests through
frontend/src/api/authApi.js - Service API → HTTP client: requests through
frontend/src/api/serviceApi.js - HTTP client → Express server: sends HTTP
README.md - Express server → API routes: mounts
backend/src/server.js - API routes → Authentication: dispatches
README.md - API routes → Court management: dispatches
README.md - API routes → Booking management: dispatches
README.md - API routes → Customer CRM: dispatches
README.md - API routes → POS and services: dispatches
README.md - API routes → Transactions and reports: dispatches
README.md - API routes → Sync and health: dispatches
README.md - Authentication → MySQL pool: queries
README.md - Court management → MySQL pool: queries
README.md - Booking management → MySQL pool: writes bookings
README.md - Customer CRM → MySQL pool: queries
README.md - POS and services → MySQL pool: records POS
README.md - Transactions and reports → MySQL pool: aggregates
README.md - Sync and health → MySQL pool: syncs
README.md - Sync and health → Cache and sync store: persists cache
README.md - Cache and sync store → MySQL pool: syncs or falls back
README.md - MySQL pool → MySQL database: executes SQL
README.md