How chutikan489622-star/api_681310006 works
This is a small Express badminton-court booking API with booking creation, listing, conflict checks, deletion, and health endpoints. The nested badminton-booking-api/server.js is the more complete implementation: it reads and writes db.json and includes an in-memory fallback. The tree contains a second, divergent root-level server; this graph describes the nested implementation. The HTML is present, but its contents were not sampled, so its interaction with the API is not inferred.
Main entry points: server.js Booking storage · db.json JSON file
Components 11
Booking API
- Express routes
badminton-booking-api/server.js - Health check
badminton-booking-api/server.js - List bookings
badminton-booking-api/server.js - Create booking
badminton-booking-api/server.js - Delete booking
badminton-booking-api/server.js
Booking Rules
- Input validation
badminton-booking-api/server.js - Overlap check
badminton-booking-api/server.js - Date ordering
badminton-booking-api/server.js
Booking State
- Booking storage
badminton-booking-api/server.js - JSON file
badminton-booking-api/db.json
Other components
- API client
Connections 14
- API client → Express routes: sends requests
- Express routes → Health check: dispatches
- Express routes → List bookings: dispatches
- Express routes → Create booking: dispatches
- Express routes → Delete booking: dispatches
- List bookings → Booking storage: reads bookings
- List bookings → Date ordering: sorts by date
- Create booking → Input validation: validates input
- Create booking → Booking storage: reads bookings
- Create booking → Overlap check: checks overlap
- Create booking → Booking storage: writes booking
- Delete booking → Booking storage: reads bookings
- Delete booking → Booking storage: writes remaining
- Booking storage → JSON file: reads and writes