A comprehensive, mission-critical platform for managing airline operations with real-time seat inventory management and demand-based dynamic pricing.
Features β’ Architecture β’ Getting Started β’ API Reference β’ Team
- Overview
- Features
- Technology Stack
- System Architecture
- Project Structure
- Getting Started
- API Reference
- Database Schema
- Key Features Deep Dive
- Contributing
- Authors
The Airline Reservation and Dynamic Pricing System (ARDPS) is a high-availability platform designed to handle the complete lifecycle of airline operations. It manages flight scheduling, seat inventory, passenger profiles, bookings, ticketing, and implements intelligent dynamic pricing strategies based on demand and occupancy rates.
This system is built with MongoDB as the document database to handle hierarchical data structures, flexible schemas, and high-throughput operations required in the aviation industry.
βοΈ Flight Management: Complete lifecycle from scheduling to completion- π« Booking & Ticketing: Seamless reservation and e-ticket generation
- π° Dynamic Pricing: Real-time fare adjustment based on demand and occupancy
- π₯ Passenger Management: Comprehensive passenger profiles and frequent flyer tracking
- π Concurrency Control: Atomic seat reservations with temporary seat holds
- π Analytics & Admin: Comprehensive system administration and reporting
- Flight Scheduling: Create and manage flight routes with multiple departure times
- Real-Time Seat Inventory: Track seat availability across different cabin classes (Economy, Business, First Class)
- Concurrent Seat Hold: Temporary seat locking mechanism to prevent double-booking during peak traffic
- Seat Allocation Management: Assign and manage seats with automatic availability updates
- Passenger Profiles: Maintain comprehensive passenger information and travel history
- Frequent Flyer Program: Track loyalty points and membership tiers
- Travel Preferences: Store passenger preferences for seamless booking experience
- Documentation: Manage passenger documents and travel requirements
- Smart Search: Advanced flight search with multiple filters and sorting options
- Atomic Booking: ACID-compliant booking transactions ensuring data consistency
- Instant E-Ticket Generation: Auto-generated e-tickets with PNR numbers
- Booking History: Complete booking record with payment snapshots
- Cancellation & Refunds: Flexible cancellation policies with refund processing
- Demand-Based Pricing: Automatic fare adjustment based on occupancy percentage
- Advance Booking Brackets: Special rates for early bird bookings
- Seasonal Pricing: Different pricing rules for peak and off-peak seasons
- Price Preservation: Historical fare logging to track actual price paid at booking time
- Pricing Rules Management: Flexible rule engine for custom pricing scenarios
- Dashboard Analytics: Real-time system statistics and performance metrics
- User Management: Administrative control over system users
- Report Generation: Automated PDF and presentation generation
- System Maintenance: Database seeding, collection management, and debugging tools
- Runtime: Node.js
- Framework: Express.js 4.18.2
- Database: MongoDB 6.3.0
- Middleware: CORS for cross-origin requests
- Additional Libraries: PPTXGenJS for report generation
- Markup: HTML5
- Styling: Custom CSS with modern design patterns
- Client Logic: Vanilla JavaScript (ES6+)
- UI Patterns: Glass-morphism and responsive design
- Pattern: Model-View-Controller (MVC) with API-driven architecture
- Communication: RESTful API
- Database Type: NoSQL Document Database (MongoDB)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FRONTEND LAYER β
β (HTML5, CSS, Vanilla JavaScript - SPA) β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Search β Passengers β Bookings β Tickets β Admin β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β
β REST API (JSON)
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β BACKEND LAYER β
β (Express.js REST API) β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β /api/flights - Flight operations β β
β β /api/passengers - Passenger management β β
β β /api/bookings - Booking operations β β
β β /api/tickets - Ticket generation β β
β β /api/pricing - Dynamic pricing engine β β
β β /api/admin - Administrative endpoints β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β
β Connection Pool
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β DATA LAYER β
β (MongoDB Database) β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Collections: β β
β β β’ airports, aircraft, flights β β
β β β’ passengers, bookings, tickets β β
β β β’ pricing_rules, seat_holds β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
airport_reservation_system/
βββ backend/ # Backend application
β βββ config/
β β βββ db.js # MongoDB connection configuration
β βββ routes/
β β βββ admin.js # Administrative endpoints
β β βββ bookings.js # Booking management endpoints
β β βββ flights.js # Flight operations endpoints
β β βββ passengers.js # Passenger management endpoints
β β βββ pricing.js # Dynamic pricing endpoints
β β βββ tickets.js # E-ticket generation endpoints
β βββ seed.js # Database seeding script
β βββ server.js # Express server entry point
β βββ package.json # Backend dependencies
β
βββ frontend/ # Frontend application
β βββ index.html # Main SPA entry point
β βββ admin.html # Admin panel (if separate)
β βββ css/
β β βββ style.css # Unified styling
β βββ js/
β βββ app.js # Frontend application logic
β
βββ Utility Scripts
β βββ collection_create.js # MongoDB collection initialization
β βββ debug.js # Debugging utilities
β βββ insert_data.js # Data insertion scripts
β βββ generate_doc.js # Documentation generation
β βββ generate_ppt.js # PowerPoint report generation
β βββ seed.js # Database seeding
β
βββ Documentation
βββ ARDPS_Assignment1_Refined.md # Detailed system documentation
βββ ARDPS_Assignment1_Refined.html# HTML documentation
βββ er_diagram_chen.html # Entity Relationship diagram
βββ diagrams.html # System diagrams
- Node.js (v14 or higher)
- npm or yarn package manager
- MongoDB (local instance or MongoDB Atlas connection)
- Git (for version control)
-
Clone the Repository
cd airport_reservation_system -
Install Backend Dependencies
cd backend npm install -
Install Frontend Dependencies (if using separate build)
cd ../frontend npm install -
Configure Database Connection
Update
backend/config/db.jswith your MongoDB connection string:const mongoURI = process.env.MONGODB_URI || "mongodb://localhost:27017/ardps";
-
Initialize Database
cd backend node seed.js # Seed initial data
cd backend
npm run devThe application will start on http://localhost:3000
cd backend
npm startCreate a .env file in the backend directory:
PORT=3000
MONGODB_URI=mongodb://localhost:27017/ardps
NODE_ENV=developmenthttp://localhost:3000/api
GET /- Retrieve all flights with filtersGET /:id- Get flight details by IDPOST /- Create new flightPUT /:id- Update flight informationDELETE /:id- Delete flight
Search Example:
curl "http://localhost:3000/api/flights?origin=MAA&destination=BLR&date=2025-06-15"GET /- List all passengersGET /:id- Get passenger detailsPOST /- Register new passengerPUT /:id- Update passenger profileDELETE /:id- Remove passenger
GET /- List all bookingsGET /:id- Get booking detailsPOST /- Create new bookingPUT /:id- Update bookingDELETE /:id- Cancel booking
Booking Payload Example:
{
"passengerId": "P123",
"flightId": "FL456",
"seats": ["12A", "12B"],
"cabinClass": "economy",
"paymentMethod": "credit_card"
}GET /- List all ticketsGET /:pnr- Get ticket by PNR numberPOST /- Generate e-ticketPUT /:id- Update ticket
GET /- Get all pricing rulesGET /flight/:flightId- Get dynamic price for flightPOST /- Create pricing rulePUT /:id- Update pricing rule
GET /stats- System statisticsGET /reports- Generate reportsPOST /backup- Database backupPOST /seed- Reseed database
Relationships:
- Tickets ββ> Passengers ββ> Bookings
- Bookings ββ> Flights ββ> Airports & Aircraft
- Flights ββ> Pricing Rules (demand-based)
- Bookings ββ> Seat Holds (concurrency control)
{
_id: ObjectId,
flightNumber: String,
origin: String (IATA),
destination: String (IATA),
departureTime: Date,
arrivalTime: Date,
aircraft: ObjectId,
basefare: Number,
seats: {
economy: { total: Number, available: Number },
business: { total: Number, available: Number },
first: { total: Number, available: Number }
},
seatLayout: Array,
status: String (scheduled, in-flight, completed, cancelled)
}{
_id: ObjectId,
firstName: String,
lastName: String,
email: String,
phone: String,
passport: String,
dateOfBirth: Date,
frequentFlyerTier: String,
frequentFlyerPoints: Number,
preferences: {
seatPreference: String,
mealPreference: String
}
}{
_id: ObjectId,
bookingReference: String,
passenger: ObjectId,
flight: ObjectId,
seats: Array,
cabinClass: String,
priceSnapshot: {
baseFare: Number,
discount: Number,
tax: Number,
totalPrice: Number
},
status: String (confirmed, cancelled, completed),
bookingDate: Date,
paymentStatus: String
}{
_id: ObjectId,
pnr: String,
booking: ObjectId,
passenger: ObjectId,
seat: String,
boarding_pass: String,
issueDate: Date,
expiryDate: Date
}{
_id: ObjectId,
flightRoute: String,
season: String,
occupancyBrackets: Array,
advanceBookingRates: Array,
effectiveDate: Date,
expiryDate: Date
}The system implements a multi-factor pricing model:
-
Base Fare: Standard pricing for the route
-
Occupancy Factor:
- 0-25%: -15% discount
- 26-50%: -5% discount
- 51-75%: Base price
- 76-90%: +15% premium
- 91-100%: +25% premium
-
Advance Booking Bonus:
- 30+ days: -20% discount
- 14-29 days: -10% discount
- 7-13 days: -5% discount
- 0-6 days: Base or premium pricing
-
Seasonal Multiplier:
- Peak Season: 1.3x
- Normal Season: 1.0x
- Off-Peak: 0.85x
To prevent overbooking during concurrent user sessions:
- Seat Hold Mechanism: When a user selects a seat, it's temporarily locked for 10 minutes
- TTL Indexes: Automatic removal of expired seat holds
- Atomic Updates: MongoDB's atomic $inc operators ensure no race conditions
Every booking follows strict ACID principles:
- Atomicity: All-or-nothing: seats deducted, payment processed, ticket generated
- Consistency: Flight seat count always accurate
- Isolation: Concurrent bookings don't interfere
- Durability: All successful bookings persist permanently
| Constraint | Implementation |
|---|---|
| No Overbooking | Atomic $inc with availability check |
| Unique PNR | Unique index on tickets.pnr |
| Referential Integrity | Manual validation via ObjectId references |
| Historical Audit | Immutable booking records with price snapshots |
| Session Management | TTL-based seat holds |
| Scalability | Horizontal partitioning by route/date |
node backend/seed.jsInitializes the database with sample airports, aircraft, flights, and pricing rules.
node insert_data.jsAdds sample passenger and booking data for testing.
node generate_doc.jsCreates detailed HTML and Markdown documentation.
node generate_ppt.jsCreates PowerPoint presentations with system statistics and analytics.
node debug.jsUtility script for debugging database issues and inspecting data.
| Name | Registration Number | Role |
|---|---|---|
| Danush K | 3122247001013 | Developer |
| Jeeva G | 3122247001027 | Developer |
| Chitraju Vishnu Vineeth | 3122247001012 | Developer |
Institution: Sri Sivasubramaniya Nadar College of Engineering
Course: ICS1402 - Database Systems
Faculty: Dr. N. Sujaudeen
Batch: 2024-29
This project is licensed under the MIT License - see the LICENSE file for details.
For issues, questions, or contributions, please:
- Report Issues: Create an issue on the project repository
- Email: Contact the development team
- Documentation: Refer to ARDPS_Assignment1_Refined.md for detailed documentation
| Version | Date | Notes |
|---|---|---|
| 1.0.0 | 2025 | Initial release with full feature set |
- System Documentation
- Entity Relationship Diagram
- System Architecture Diagrams
- MongoDB Documentation
- Express.js Guide
Project Lead & Developer: Danush K
Developed as part of the NoSQL Database Systems Learning
