A distributed, event-driven backend system for flight management, booking orchestration, and automated notifications β paired with a premium Jetpack Compose Android client.
Built with Node.js, Express, MySQL, RabbitMQ, and Kotlin (Jetpack Compose). Deployed on AWS using a custom API Gateway and Auto Scaling Groups.
This APK demonstrates the full UI/UX with static mock data. No backend required.
β¬οΈ Download APK (Google Drive)
π¦ Android App Repository β GitHub
- Open the Google Drive link above on your Android phone and tap Download
- Once downloaded, tap the
.apkfile in your notifications or file manager - If prompted, go to
Settings β Security β Install unknown appsand enable it for your browser/file manager - Tap Install and open the app
-
Note: This APK uses static mock data. To use live booking with the real backend, build from source (see Run the Android App below)
| Service | Responsibility | Repository |
|---|---|---|
| API Gateway | Central entry point, Routing, Rate Limiting, Auth Proxy | Link |
| Auth Service | JWT issuance, Validation, User Management | Link |
| Flight Service | Flight Catalog, City/Airport Management, Search Filters | Link |
| Booking Service | Booking Orchestration, Transaction Management, Message Publishing | Link |
| Reminder Service | Cron Jobs, Email Notifications, RabbitMQ Consumer | Link |
This is a comprehensive Airline Booking System built using a Microservices Architecture. It simulates a real-world production environment where different functionalities (Authentication, Booking, Flight Search, Notifications) are decoupled into independent services.
The system handles the complete flow of a flight reservation β from searching for flights and managing seat inventory, to processing secure bookings and sending asynchronous email notifications β all accessible through a polished Android mobile client.
- JWT Authentication β Login & signup with role selection (Passenger / Admin); session persisted in SharedPreferences
- Live Flight Search β Real airport dropdowns from API; filtered by departure airport, arrival airport, and travel date (timezone-aware)
- Premium Flight Cards β Airline branding, flight duration, seat availability indicator, price per seat
- Booking Flow β Seat selector, real-time booking creation, success/error dialogs; triggers confirmation email via RabbitMQ
- My Bookings β Boarding-pass style cards split into Upcoming and Previous tabs, sorted by departure time
- User Profile β Displays real JWT-decoded email and role
- Admin Panel β Full flight and airport CRUD management
- Custom UI β Wave-shaped curved bottom nav with raised FAB; all times shown in device local timezone
- Smart Flight Search β Filter by source, destination, and price range
- Real-Time Seat Availability β Atomic seat inventory update prevents overbooking
- Secure Authentication β JWT + bcrypt password hashing
- Instant Booking Confirmation β Email sent immediately after booking
- Automated Reminders β Cron job sends flight reminder emails 24 hours before departure
- Centralized API Gateway β Single entry point for routing, rate limiting, and logging
- Event-Driven Architecture β RabbitMQ decouples booking from notifications for low latency
- Resilient Scheduling β Reminder Service handles scheduling even if mail server is temporarily down
- Scalable Infrastructure β AWS Auto Scaling Groups + Load Balancers for traffic spikes
Android App (Jetpack Compose)
β
βΌ
API Gateway :3005
βββββββββββββββββββββββββββββββββββ
β Auth Service :7000 β
β Flight Service :3000 β
β Booking Service :5000 ββββ RabbitMQ ββββ Reminder Service :3004
βββββββββββββββββββββββββββββββββββ β
β Nodemailer (Email)
MySQL / AWS RDS
Key Workflows:
- Search:
AppβGatewayβFlight Service(MySQL) - Booking:
AppβGatewayβBooking ServiceβFlight Service(seat check) βMySQL(save) - Notification:
Booking ServiceβRabbitMQβReminder ServiceβNodemailer
| Layer | Technology |
|---|---|
| Language | Kotlin |
| UI | Jetpack Compose (Material 3) |
| Navigation | Compose Navigation (androidx.navigation) |
| Dependency Injection | Dagger Hilt (@HiltViewModel, @Singleton) |
| Networking | Retrofit 2 + OkHttp (with AuthInterceptor for JWT) |
| Serialization | Gson (@SerializedName) |
| State Management | Kotlin StateFlow / MutableStateFlow |
| Auth | JWT decoded from SharedPreferences |
| Date/Time | java.time (API 26+): Instant, ZoneId, LocalDate |
| Min SDK | API 26 (Android 8.0) |
| Layer | Technology |
|---|---|
| Runtime | Node.js |
| Framework | Express.js |
| Database | MySQL + Sequelize ORM |
| Cloud DB | AWS RDS |
| Message Broker | RabbitMQ (amqplib) |
| Task Scheduling | node-cron |
| Nodemailer | |
| Auth | JWT + bcrypt |
| Logging | Morgan |
| Cloud Infra | AWS EC2, Auto Scaling Groups, ALB |
- Node.js (v18+)
- MySQL Server running locally
- RabbitMQ running locally (
amqp://localhost) - Android Studio Hedgehog or newer (for the app)
- JDK 17+, Android SDK API 26+
Create a root folder and clone each service into it:
mkdir AirlineBookingProject && cd AirlineBookingProject
# 1. API Gateway
git clone https://github.com/rkt0209/ApiGateway
# 2. Auth Service
git clone https://github.com/rkt0209/Auth_Service
# 3. Flight & Search Service
git clone https://github.com/rkt0209/flightsandSearch
# 4. Booking Service
git clone https://github.com/rkt0209/bookingService
# 5. Reminder Service
git clone https://github.com/rkt0209/reminderService
# 6. Android App
git clone https://github.com/rkt0209/airlineManagmentAPPCreate the three databases in your local MySQL:
CREATE DATABASE auth_db;
CREATE DATABASE booking_db;
CREATE DATABASE flights_search_db;Create config.json inside each service's src/config/ folder:
{
"development": {
"username": "root",
"password": "YOUR_MYSQL_PASSWORD",
"database": "SERVICE_DB_NAME",
"host": "127.0.0.1",
"dialect": "mysql"
}
}| Service | "database" value |
|---|---|
| Auth Service | "auth_db" |
| Booking Service | "booking_db" |
| Reminder Service | "booking_db" |
| Flight Service | "flights_search_db" |
Create a .env file in the root of each service folder:
API Gateway
PORT=3005
AUTH_SERVICE=http://localhost:7000
BOOKING_SERVICE=http://localhost:5000
FLIGHT_SERVICE=http://localhost:3000Auth Service
PORT=7000
SALT=YourRandomSaltString
JWT_KEY=YourSecretKey
DB_SYNC=trueFlight Search Service
PORT=3000
DB_SYNC=trueBooking Service
PORT=5000
DB_SYNC=false
FLIGHT_SERVICE_PATH=http://localhost:3000/flightservice
USER_SERVICE_PATH=http://localhost:7000/authservice
MESSAGE_BROKER_URL=amqp://localhost
EXCHANGE_NAME=AIRLINE_BOOKING
REMINDER_BINDING_KEY=REMINDER_SERVICEReminder Service
PORT=3004
EMAIL_ID=your-email@gmail.com
EMAIL_PASS=your-gmail-app-password
MESSAGE_BROKER_URL=amqp://localhost
EXCHANGE_NAME=AIRLINE_BOOKING
REMINDER_BINDING_KEY=REMINDER_SERVICEFor
EMAIL_PASS: use a Gmail App Password (not your account password). Generate one atGoogle Account β Security β 2-Step Verification β App Passwords.
Open 5 separate terminals and run in this order:
# 1. Auth Service
cd Auth_Service && npm install && npx sequelize db:migrate && npm start
# 2. Flight Service
cd flightsandSearch && npm install && npx sequelize db:migrate && npm start
# 3. Reminder Service
cd reminderService && npm install && npx sequelize db:migrate && npm start
# 4. Booking Service
cd bookingService && npm install && npx sequelize db:migrate && npm start
# 5. API Gateway (last β depends on all other services)
cd ApiGateway && npm install && npm startStartup order matters: RabbitMQ and MySQL must be running before any service. API Gateway must start last.
The backend is now live at: http://localhost:3005
- Launch Android Studio
File β Openβ select theairlineManagmentAPP/folder- Wait for Gradle sync to complete
The app defaults to http://10.0.2.2:3005 β the Android emulator's loopback address for your host machine.
| Scenario | What to do |
|---|---|
| Running on emulator | No change needed β 10.0.2.2 works out of the box |
| Running on a physical device | Open app/src/main/java/com/example/airline/core/network/NetworkModule.kt and replace 10.0.2.2 with your machine's local IP (e.g., 192.168.1.5) |
Your phone and computer must be on the same Wi-Fi network.
- Select an emulator or connected device (API 26+)
- Click Run βΆ or press
Shift + F10 - The app will launch and connect to your running backend
If you want to share the app with someone who already has the backend running:
- In Android Studio:
Build β Build Bundle(s) / APK(s) β Build APK(s) - APK is generated at:
airlineManagmentAPP/app/build/outputs/apk/debug/app-debug.apk - Transfer the APK to the target Android device (USB, Google Drive, etc.)
- On the device:
Settings β Security β Install unknown appsβ enable for your file manager - Tap the APK file and install
- Ensure the device is on the same network as the backend, or point to a deployed backend URL
- Hardware: t2.micro / t2.medium EC2 instances
- OS: Ubuntu 24.04 LTS
- Database: AWS RDS (MySQL)
- Scaling: AWS Auto Scaling Group (ASG) behind an Application Load Balancer (ALB)
- RDS Setup: Create a MySQL instance on AWS RDS
- Launch Template: Create an EC2 Launch Template using the User Data Script in
aws/launch-script.shUpdate the
DB_HOSTvariable in the script with your RDS Endpoint - Auto Scaling: Create an Auto Scaling Group using the template
- Load Balancer: Attach an Application Load Balancer (Internet Facing) listening on Port 80
- Target Group: Point the Load Balancer to Port 3005 (the API Gateway)
- Android App (Cloud): Update
NetworkModule.ktwith the Load Balancer DNS and rebuild the APK
GET http://<LOAD_BALANCER_DNS>/home
POST http://<LOAD_BALANCER_DNS>/flightservice/api/v1/flights
/config β Environment configs and DB connections
/controllers β HTTP request/response handlers
/services β Core business logic
/repository β Data Access Layer (DB queries)
/models β Sequelize schema definitions
/migrations β Database schema version control
/seeders β Initial data population scripts
/middlewares β Auth checks, validation, error handling
/routes β API route definitions
/utils β Helper functions and error classes
This project is for educational and portfolio purposes.