https://github.com/bhaskaracharjee/passengerhub
Passenger Management System
https://github.com/bhaskaracharjee/passengerhub
jsp-servlet passenger-management sqlite
Last synced: 2 months ago
JSON representation
Passenger Management System
- Host: GitHub
- URL: https://github.com/bhaskaracharjee/passengerhub
- Owner: BhaskarAcharjee
- License: mit
- Created: 2025-03-04T18:15:59.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-04-24T18:18:20.000Z (about 1 year ago)
- Last Synced: 2025-06-21T17:07:47.465Z (about 1 year ago)
- Topics: jsp-servlet, passenger-management, sqlite
- Language: Java
- Homepage:
- Size: 15 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🛤️ PassengerHub – Passenger Management System
**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.
---
## 🚀 Features
### 🖥️ Admin Dashboard
- 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
### 👥 Passenger Management
- View, Add, Edit, Delete Passengers
- Search and filter passengers by username or full name
- Sort and manage data in a user-friendly table
### 🚆 Train Schedule Management
- Displays all available trains
- Shows origin, destination, arrival, and departure times
### 🎫 Ticket Booking System
- 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
---
## 📷 Screenshots

Dashboard Page

Passenger List Page

Add Passenger Modal

Train Schedule Page

Booking Page

Generated Ticket

User Profile Page
---
## 🧩 Database Schema
PassengerHub uses **SQLite (pms.db)** with the following schema:
### `passengers`
| 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 |
### `bookings`
| 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 |
### `train_schedule`
| 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 |
### `train_ticket_prices`
| 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 |
---
## 🛠️ Technologies Used
- Java (JSP & Servlets)
- HTML, CSS, JavaScript (Vanilla)
- SQLite for local database
- JDBC for DB interaction
- Apache Tomcat Server
---
## 📂 How to Run
1. Open the project in **Eclipse IDE** or any Java IDE with **Tomcat support**
2. Make sure SQLite database `pms.db` is placed in the project root
3. Set up Tomcat server and run the project
4. Navigate to `http://localhost:8080/PassengerHub` in your browser
---
## ✍️ Future Improvements
- User-side ticket booking with login
- PDF ticket generation
- Responsive UI with modern design
- Train tracking and delay updates
---
## 🤝 Contributing
Contributions are welcome! Feel free to fork the repo, make changes, and open a pull request.
## 📄 License
This project is open-source and available under the [MIT License](LICENSE).