How abishagj/metro-rail-reservation-system works
This is a single-file, full-stack metro ticket booking app: passengers look up their account, choose stations, find upcoming trains, book a ticket, then receive it by SMS or PDF. Express serves both the React interface and REST API; MySQL provides booking and schedule data. The README describes additional booking and database behavior, but the SQL schema file it names is absent from the supplied tree. Some internal service calls fall in omitted app.js excerpts, so those links are left unverified.
Main entry points: app.js React booking UI
Components 12
Passenger interface
- React booking UI
app.js
REST API
- Account lookup
app.js - Station search
app.js - Upcoming trains
app.js - Booking endpoint
app.js - PDF download route
app.js
Ticket services
- Booking procedure
app.js - PDF generation
app.js - SMS delivery
app.js
Data layer
- MySQL database
Other components
- Passenger
- SMS provider
Connections 15
- Passenger → React booking UI: uses
README.md - React booking UI → Account lookup: looks up
app.js - React booking UI → Station search: searches
app.js - React booking UI → Upcoming trains: requests trains
app.js - React booking UI → Booking endpoint: submits booking
app.js - React booking UI → PDF download route: downloads ticket
app.js - Account lookup → MySQL database: queries
app.js - Station search → MySQL database: queries
app.js - Upcoming trains → MySQL database: queries
app.js - Booking endpoint → MySQL database: calls procedure
app.js - Booking endpoint → Booking procedure: invokes
app.js - Booking endpoint → SMS delivery: dispatches SMS
app.js - PDF download route → PDF generation: generates ticket
app.js - PDF generation → MySQL database: reads booking
- SMS delivery → SMS provider: sends message