Modern Full-Stack Flight Booking and Reservation Platform
XaprAir is a comprehensive, enterprise-grade flight booking and reservation system developed as a full-stack web application. This project demonstrates real-world database management, API design, and modern frontend development practices.
- π Multi-language Support - 8 languages (EN, TR, DE, ES, FR, AR, ZH, JA, RU)
- π± Multi-currency - 7 currencies (USD, EUR, TRY, GBP, JPY, CNY, AED)
- π JWT Authentication - Secure token-based authentication
- π₯ Role-Based Access Control - Customer, Manager, Admin roles
- πΊ Dynamic Seat Management - Real-time availability tracking
- π« Online Check-in - Automated check-in 24 hours before departure
- π³ Payment Processing - Mock payment gateway integration
- π Admin Dashboard - Comprehensive management interface
- π¨ 10 Color Themes - Customizable UI themes
| Layer | Technology | Version |
|---|---|---|
| Frontend | React + TypeScript + Vite | 18.2.0 |
| Backend | Express.js + Node.js | 5.1.0 + 24.9.0 |
| Database | Microsoft SQL Server | 2022 |
| ORM | Sequelize | 6.37.7 |
| Authentication | JWT + bcryptjs | 9.0.2 + 3.0.2 |
| Payment | Mock Gateway | N/A |
xaprair-flight-management-system/
βββ backend/ # Express.js Backend API
β βββ config/ # Database configuration
β βββ controllers/ # 7 controllers (admin, auth, flight, reservation, manage, payments, preferences)
β βββ routes/ # 7 route modules
β βββ middleware/ # Authentication, roles, localization
β βββ services/ # Database, payment, currency, i18n
β βββ utils/ # Helper functions, validators, constants
β βββ tests/ # 11 REST Client test files
β βββ server.js # Express server entry point
β βββ db.js # SQL Server connection
β βββ test-connection.js # Database health check
β βββ package.json # Backend dependencies
β βββ .env.example # Environment variables template
β βββ README.md # Backend documentation
β
βββ frontend/ # React Frontend (Vite + TypeScript)
β βββ public/ # Static assets (icons, favicons)
β βββ src/
β β βββ components/ # React components (Navbar, Footer, etc.)
β β βββ locales/ # i18n translation files
β β βββ pages/ # Page components (FlightSearch, Preferences, etc.)
β β βββ services/ # Frontend-backend API integration
β β βββ styles/ # CSS files (10 themes)
β β βββ utils/ # Frontend utility functions
β β βββ App.tsx # Main App component
β β βββ i18n.ts # i18n multi-language configuration
β β βββ main.tsx # Frontend entry point
β β βββ vite-env.d.ts # Vite TypeScript definitions
β βββ .env.example # Frontend environment variables template
β βββ index.html # HTML template
β βββ package.json # Frontend dependencies
β βββ tsconfig.json # TypeScript configuration
β βββ vite.config.ts # Vite configuration
β
βββ database/ # SQL Server Database Scripts
β βββ schema/ # Table creation, constraints, indexes (13 tables)
β βββ functions/ # 4 scalar functions (pricing, cancellation, concatenation)
β βββ views/ # 8 views (flight availability, reports)
β βββ procedures/ # 38 stored procedures (reservations, payments, management)
β β βββ admin/ # Admin procedures (13)
β β βββ customer/ # Customer procedures (7)
β β βββ manager/ # Manager procedures (7)
β β βββ maintenance/ # Maintenance procedures (5)
β βββ triggers/ # 7 triggers (audit logs, status updates, validations)
β βββ seed/ # Seed scripts + JS generators
β βββ indexes/ # 20+ index creation scripts
β βββ jobs/ # 5 SQL Agent job scripts
β
βββ package.json # Workspace root package.json
βββ .gitignore # Git ignore rules
βββ LICENSE # License
βββ README.md # This file
- Node.js: v18+ (recommended v20+)
- Microsoft SQL Server: 2022 or later
- npm: 9+
# Clone the repository
git clone https://github.com/xaprier/xaprair-flight-management-system.git
cd xaprair-flight-management-system
# Install all dependencies (root + backend + frontend)
npm run install:all# Backend .env configuration
cd backend
cp .env.example .env
# Edit the .env file with your database credentials
nano .env # or use any text editorBackend .env example:
# Database
DB_SERVER=localhost
DB_PORT=1433
DB_NAME=DB_EXAMPLE_NAME
DB_USER=sa
DB_PASS=YourStrongPassword123!
# JWT
JWT_SECRET=change-this-to-a-secure-random-string-in-production
JWT_EXPIRES_IN=24h
# Server
PORT=5000
NODE_ENV=development
FRONTEND_URL=http://localhost:3000
# Payment Gateway
PAYMENT_MODE=mock # mock (simulated)Frontend .env example:
# API Configuration
VITE_API_URL=http://localhost:5000/apiImportant: All SQL scripts in the database/ directory use USE DB_EXAMPLE_NAME. You can either:
- Use this database name as-is, or
- Find and replace all occurrences with your preferred database name before running scripts
-- 1. Create database in SQL Server (you can use any name you prefer)
CREATE DATABASE YourDatabaseName; -- Or use: DB_EXAMPLE_NAME
GO
USE YourDatabaseName;
GO
-- 2. If you used a different database name, update your backend .env:
-- DB_NAME=YourDatabaseName
-- 3. Run schema files in order
-- See database/README.md for detailed setup instructionsQuick database setup using scripts:
cd database
# Option 1: Run all scripts manually in SQL Server Management Studio (SSMS)
# Follow the order: schema -> functions -> procedures -> triggers -> views -> seed
# Option 2: Use the automated script runner
node run-scripts.js
# Generate sample data
cd seed
node generate-flights.js # Creates flights for 7 days back, 203 days forward
node generate-reservations.js 500 # Creates 500 random reservationsBackend Server:
cd backend
# Production mode
npm start
# Development mode (with nodemon auto-reload)
npm run dev
# Test database connection
npm run testBackend server runs at: http://localhost:5000
Frontend Application:
cd frontend
# Development server
npm run dev
# Production build
npm run buildFrontend dev server runs at: http://localhost:3000
Full-Stack Development (Monorepo):
# From root directory - runs both backend and frontend concurrently
npm run dev
# Or separately:
npm run backend # Backend only
npm run frontend # Frontend onlyXaprAir offers 10 beautiful color themes with both light and dark modes:
Detailed documentation for each component:
- Database
- Backend
- Frontend
- π¬π§ English
- πΉπ· Turkish
- π©πͺ German
- πͺπΈ Spanish
- π«π· French
- πΈπ¦ Arabic
- π¨π³ Chinese
- π―π΅ Japanese
- π·πΊ Russian
- π΅ USD (US Dollar)
- πΆ EUR (Euro)
- π· GBP (British Pound)
- πΉπ· TRY (Turkish Lira)
- π΄ JPY (Japanese Yen)
- π¨π³ CNY (Chinese Yuan)
- π¦πͺ AED (UAE Dirham)
- Search and book flights
- Manage reservations
- Online check-in
- View booking history
- Update profile and preferences
- View flight statistics
- Manage flight schedules
- Access reservation reports
- Monitor system performance
- Full system access
- User management
- Airline and airport management
- System configuration
- Audit log access
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Frontend (React + TypeScript) β
β - Multi-language UI (i18n) β
β - 10 Color Themes β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β REST API
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Backend API (Express.js + Node.js) β
β - JWT Authentication β
β - Role-Based Access Control β
β - Input Validation β
β - Error Handling β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Stored Procedures
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Database Layer (Microsoft SQL Server) β
β - 13 Normalized Tables β
β - 38 Stored Procedures β
β - 4 Scalar Functions β
β - 8 Views β
β - 7 Triggers β
β - 5 SQL Agent Jobs β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Users - Customer, Manager, Admin accounts
- Airlines - Airline information and logos
- Airports - Airport codes, names, locations
- Aircraft - Aircraft models and seat configurations
- Flights - Flight schedules and routes
- FlightSegments - Multi-leg flight support
- Reservations - Booking information
- Passengers - Passenger details per reservation
- Payments - Payment transactions
- Seats - Seat availability and assignments
- AuditLog - Complete audit trail
- β ACID Compliance - Full transaction support
- β Referential Integrity - Foreign key constraints
- β 3NF Normalization - Optimized schema design
- β Audit Trail - All changes logged
- β Concurrent Booking - Row-level locking
- β Dynamic Pricing - Seat class Γ passenger type
- β Automated Jobs - Status updates, check-in, cleanup
- JWT Token Authentication - Secure stateless authentication
- Password Hashing - bcrypt with salt rounds
- Role-Based Authorization - Granular access control
- SQL Injection Prevention - Parameterized queries
- XSS Protection - Input sanitization
- CORS Configuration - Restricted origin policy
- Environment Variables - Sensitive data protection
- Audit Logging - Complete activity tracking
Note: Some test cases may be based on older scenarios and might not be fully up-to-date with the current implementation. You may need to adjust test data or parameters to match your current database state.
# Backend API tests (REST Client)
cd backend/tests
# Test files available:
# - test-auth.http (Authentication)
# - test-flights.http (Flight search)
# - test-reservations.http (Booking)
# - test-payments.http (Payment processing)
# - test-admin.http (Admin operations)
# - test-manage.http (Manager operations)
# and more...cd backend
npm start # Production modecd frontend
npm run build # Creates optimized production build in dist/
# Serve the dist folder with any static file server
# nginx, Apache, or cloud platforms (Vercel, Netlify, etc.)- Set up SQL Server 2022 instance
- Run all schema scripts in order
- Execute stored procedures, functions, views, and triggers
- Configure SQL Agent jobs for automated maintenance
- Load seed data
This project is licensed under the GNUv3 License - see the LICENSE file for details.
Seymen 'xaprier' Kalkan
- GitHub: @xaprier
- LinkedIn: Seymen Kalkan
- Developed as a Database Management Systems (DBMS) course project
- Demonstrates real-world application of database design principles
- Implements modern full-stack development practices
Made with β€οΈ by xaprier
β Star this repo if you find it helpful!

























