PassengerHub is a web-based Passenger Management System developed using Java (JSP/Servlets) and SQLite. It provides a comprehensive interface for managing passengers, train schedules, and ticket bookings — complete with admin dashboard, booking workflows, and passenger search/filter features.
- Displays key stats:
- Total Registered Passengers
- Active Trains
- Total Bookings
- Shows recent bookings in a table
- Includes a PNR Checker to quickly view booking details by PNR
- View, Add, Edit, Delete Passengers
- Search and filter passengers by username or full name
- Sort and manage data in a user-friendly table
- Displays all available trains
- Shows origin, destination, arrival, and departure times
- Step 1: Enter origin, destination, travel class, and date
- Step 2: View matching trains and class-wise prices
- Step 3: Click Book to select a train and fill booking details:
- Search and select existing passenger
- Choose Seat Preference and Food Preference
- Confirm booking to:
- Generate a unique PNR
- Assign a Seat Number
- Save all booking details in the database
PassengerHub uses SQLite (pms.db) with the following schema:
| Column | Type | Description |
|---|---|---|
| id | INTEGER | Primary Key |
| username | TEXT | Unique username |
| fullName | TEXT | Full name |
| age | INTEGER | Age |
| dob | TEXT | Date of Birth |
| gender | TEXT | Gender |
| address | TEXT | Address |
| contact | TEXT | Contact Number |
| idProof | TEXT | ID Proof Type/Number |
| Column | Type | Description |
|---|---|---|
| pnr | TEXT | Primary Key (auto-generated) |
| passenger_id | INTEGER | Foreign Key to passengers |
| passenger_name | TEXT | Redundant for easier queries |
| train_no | TEXT | Train Number |
| train_name | TEXT | Train Name |
| travel_date | TEXT | Date of Journey |
| train_class | TEXT | Selected Class |
| seat | TEXT | Seat Category |
| status | TEXT | Confirmed / Waiting |
| price | REAL | Fare Amount |
| seat_preference | TEXT | Default: No Preference |
| food_preference | TEXT | Default: No Preference |
| seat_number | TEXT | Auto-assigned Seat Number |
| Column | Type | Description |
|---|---|---|
| train_no | INTEGER | Primary Key |
| train_name | TEXT | Unique |
| departure_time | TEXT | Time of Departure |
| arrival_time | TEXT | Time of Arrival |
| origin | TEXT | Source Station |
| destination | TEXT | Destination Station |
| Column | Type | Description |
|---|---|---|
| train_no | INTEGER | Foreign Key to train_schedule |
| class_type | TEXT | Class (e.g., Sleeper, AC) |
| price | REAL | Price for that class |
- Java (JSP & Servlets)
- HTML, CSS, JavaScript (Vanilla)
- SQLite for local database
- JDBC for DB interaction
- Apache Tomcat Server
- Open the project in Eclipse IDE or any Java IDE with Tomcat support
- Make sure SQLite database
pms.dbis placed in the project root - Set up Tomcat server and run the project
- Navigate to
http://localhost:8080/PassengerHubin your browser
- User-side ticket booking with login
- PDF ticket generation
- Responsive UI with modern design
- Train tracking and delay updates
Contributions are welcome! Feel free to fork the repo, make changes, and open a pull request.
This project is open-source and available under the MIT License.






