How curteinnn/classroom-booking works
Classroom Booking is a web application for signing in, browsing classroom availability, and managing users, rooms, and reservations. The demonstrated workflow is browser login → React login page → REST server and user route → user controller → MySQL; room and booking management are documented API capabilities, with booking time/conflict validation and status updates handled in the booking controller. The frontend’s Home and Rooms implementations were not sampled, so their API wiring is not inferred; the README documents broader CRUD capabilities than the inspected controller excerpts establish.
Main entry points: server.js HTTP server · database.js MySQL client · App.jsx Route selection · Login.jsx Login page
Components 14
Web interface
- Login page
frontend/src/pages/Login.jsx - Home page
frontend/src/pages/Home.jsx - Rooms page
frontend/src/pages/Rooms.jsx - Route selection
frontend/src/App.jsx
REST API
- HTTP server
backend/src/server.js - User routes
backend/src/routes/userRoutes.js - Room routes
backend/src/routes/roomRoutes.js - Booking routes
backend/src/routes/bookingRoutes.js
Domain operations
- User operations
backend/src/controllers/userController.js - Room operations
backend/src/controllers/roomController.js - Booking operations
backend/src/controllers/bookingController.js
Persistence
- MySQL client
backend/src/config/database.js
Other components
- User
- MySQL database
Connections 14
- User → Route selection: uses
- Route selection → Login page: routes
- Route selection → Home page: routes
- Login page → HTTP server: POST login
- HTTP server → User routes: mounts
- HTTP server → Room routes: mounts
- HTTP server → Booking routes: mounts
- User routes → User operations: dispatches
- Room routes → Room operations: dispatches
- Booking routes → Booking operations: dispatches
- User operations → MySQL client: queries
- Room operations → MySQL client: queries
- Booking operations → MySQL client: queries
- MySQL client → MySQL database: connects