How phan021/gym_management works
Gym Management is a role-based gym operations web app: admins, staff, and members use a React interface to manage or access gym services; requests pass through an Express API to SQL Server. The sampled API is a single large route module using SQL queries directly, rather than separate controller/model layers. README capabilities include membership, subscriptions, payments, check-ins, classes, staffing, facilities, dashboards, and reports. Those business areas are grouped below; unsampled subsystem links rely on README documentation, not inspected implementation.
Main entry points: api.routes.js API routes · server.js Express server · database.js SQL connection · App.jsx Role-based app
Components 16
Web interface
- Role-based app
Frontend/src/App.jsx - API client
Frontend/src/api/client.js
API runtime
- Express server
Backend/server.js - API routes
Backend/src/routes/api.routes.js - Token authorization
Backend/src/middleware/auth.middleware.js - SQL connection
Backend/src/config/database.js
Gym operations
- Members and accounts
Backend/src/routes/api.routes.js - Packages and subscriptions
Backend/src/routes/api.routes.js - Payments and invoices
Backend/src/routes/api.routes.js - Check-in and history
Backend/src/routes/api.routes.js - Classes and registration
Backend/src/routes/api.routes.js - Staff and trainers
Backend/src/routes/api.routes.js - Rooms and equipment
Backend/src/routes/api.routes.js - Dashboards and reports
Backend/src/routes/api.routes.js
Other components
- Gym users
- SQL Server
Connections 16
- Gym users → Role-based app: use
README.md - Role-based app → API client: requests
Frontend/src/App.jsx - API client → Express server: sends API requests
README.md - Express server → API routes: mounts
Backend/server.js - Express server → SQL connection: waits for connection
Backend/server.js - API routes → Token authorization: checks tokens
Backend/src/routes/api.routes.js - API routes → SQL connection: queries
Backend/src/routes/api.routes.js - SQL connection → SQL Server: connects
Backend/src/config/database.js - API routes → Members and accounts: handles
Backend/src/routes/api.routes.js - API routes → Packages and subscriptions: handles
Backend/src/routes/api.routes.js - API routes → Payments and invoices: handles
README.md - API routes → Check-in and history: handles
Backend/src/routes/api.routes.js - API routes → Classes and registration: handles
Backend/src/routes/api.routes.js - API routes → Staff and trainers: handles
Backend/src/routes/api.routes.js - API routes → Rooms and equipment: handles
README.md - API routes → Dashboards and reports: provides
README.md