How safa-kaware/apex-arena works
APEX ARENA is a sports-club management web application. Members sign in with Google, book courts or trainer sessions, and manage reservations; prospective members submit a membership application. The React app sends these requests through its API client to Express routes, which execute SQL through a MySQL-or-SQLite adapter. The README also documents trainer discovery and facility information, represented by the trainer directory and landing-page components. The source excerpts show this core flow; the documented database choice is implemented in the sampled adapter. Firebase authentication is visible, but server-side session guards are not shown in the excerpts.
Main entry points: App.tsx App and auth context · api.ts Frontend API client · BookingSystem.tsx Court and trainer booking · firebase.ts Firebase authentication
Components 18
Member experience
- App and auth context
src/App.tsx - Navigation and sign-in
src/components/Navbar.tsx - Club introduction
src/components/Hero.tsx - Court and trainer booking
src/components/BookingSystem.tsx - Booking schedule
src/components/MyBookings.tsx - Facility benefits
src/components/Benefits.tsx - Trainer directory
src/components/MembersGrid.tsx - Trainer profiles
src/constants/trainers.ts - Site footer
src/components/Footer.tsx
Membership features
- Membership application
src/components/CTA.tsx
API and persistence
- Frontend API client
src/api.ts - Express API routes
server.ts - Database adapter
src/db.ts - SQLite fallback
src/db.ts - MySQL database
Identity
- Firebase authentication
src/firebase.ts
Other components
- Club visitor
- Google sign-in
Connections 23
- Club visitor → App and auth context: uses
- App and auth context → Navigation and sign-in: renders
src/App.tsx - App and auth context → Club introduction: renders
src/App.tsx - App and auth context → Court and trainer booking: renders
src/App.tsx - App and auth context → Booking schedule: renders
src/App.tsx - App and auth context → Facility benefits: renders
src/App.tsx - App and auth context → Trainer directory: renders
src/App.tsx - App and auth context → Membership application: renders
src/App.tsx - App and auth context → Site footer: renders
src/App.tsx - App and auth context → Firebase authentication: observes sign-in
src/App.tsx - App and auth context → Frontend API client: syncs user
src/App.tsx - Navigation and sign-in → Firebase authentication: signs in or out
src/components/Navbar.tsx - Google sign-in → Firebase authentication: authenticates
- Court and trainer booking → Firebase authentication: requests sign-in
src/components/BookingSystem.tsx - Court and trainer booking → Trainer profiles: uses profiles
src/components/BookingSystem.tsx - Trainer directory → Trainer profiles: reads profiles
src/constants/trainers.ts - Court and trainer booking → Frontend API client: creates booking
src/components/BookingSystem.tsx - Booking schedule → Frontend API client: loads and cancels
src/components/MyBookings.tsx - Membership application → Frontend API client: submits application
src/components/CTA.tsx - Frontend API client → Express API routes: sends API requests
src/api.ts - Express API routes → Database adapter: executes SQL
server.ts - Database adapter → SQLite fallback: selects fallback
src/db.ts - Database adapter → MySQL database: selects configured
src/db.ts