Deployed in EC2 http://44.204.70.162/
A full-stack aviation routing platform that finds the most optimal flight route between airports using advanced graph algorithms such as Dijkstra, BFS, and DFS.
The project combines:
- DSA + Graph Theory
- Modern Full-Stack Development
- Authentication & Database Integration
- CI/CD Automation
- Docker + Kubernetes Deployment
- Jenkins-Based DevOps Workflow
Built as a real-world learning project to understand how scalable route optimization systems and DevOps pipelines work together in production environments.
Flight Route Optimizer allows users to:
- Search routes between airports
- Optimize by cost or distance
- Compare graph algorithms
- Benchmark algorithm performance
- Use dynamic + fallback airport datasets
- Authenticate users securely
- Deploy scalable containers using Kubernetes
- Automate deployments with Jenkins CI/CD
The application demonstrates practical implementation of:
- Graph Data Structures
- Shortest Path Algorithms
- REST API Architecture
- Authentication Systems
- Docker Containerization
- Kubernetes Orchestration
- Jenkins Automation
- Cloud Deployment Pipelines
- 🔎 Dynamic airport search
- 🧮 Algorithm comparison (BFS, DFS, Dijkstra)
- 💰 Optimize by cost or distance
- 📊 Route benchmarking & graph visualization
- 🌍 Aviation API integration with fallback airport dataset
- User Login & Registration
- JWT-based authentication
- MongoDB Atlas integration
- Secure API handling
- Environment variable configuration
- Dockerized frontend & backend
- Jenkins CI/CD pipeline
- Kubernetes deployment automation
- Automated rollout restarts
- Health verification after deployments
- Parallelized builds for faster CI execution
- ngrok integration for webhook exposure during development
- Vercel deployment support
- Render deployment alternative
| Algorithm | Purpose | Time Complexity |
|---|---|---|
| Dijkstra | Finds the shortest weighted route | O((V + E) log V) |
| BFS | Finds minimum-hop route | O(V + E) |
| DFS | Explores possible paths | O(V + E) |
- React
- Vite
- Axios
- Tailwind CSS
- Modern responsive UI
- Node.js
- Express.js
- MongoDB Atlas
- JWT Authentication
- AviationStack API
- Docker
- Jenkins
- Kubernetes
- ngrok
- Vercel
- Render
- GitHub
flight-optimizer/
│
├── client/
│ ├── api/
│ │ └── index.js # Serverless backend API
│ ├── src/
│ │ ├── components/
│ │ ├── pages/
│ │ ├── utils/
│ │ └── App.jsx
│ ├── public/
│ ├── vite.config.js
│ └── package.json
│
├── backend/
│ ├── routes/
│ ├── models/
│ ├── middleware/
│ ├── controllers/
│ └── server.js
│
├── kubernetes/
│ ├── deployment.yaml
│ ├── service.yaml
│ └── secrets.yaml
│
├── Jenkinsfile
├── Dockerfile
├── docker-compose.yml
└── README.mdgit clone https://github.com/hridayesh68/flight-optimizer.git
cd flight-optimizercd client
npm installcd backend
npm installCreate a .env file inside the backend directory:
PORT=5000
MONGO_URI=your_mongodb_connection
JWT_SECRET=your_secret
AVIATIONSTACK_API_KEY=your_api_keycd backend
npm run devcd client
npm run devFrontend runs on:
http://localhost:5173Backend runs on:
http://localhost:5000docker build -t flight-optimizer .docker run -d -p 3000:3000 flight-optimizer| Command | Meaning |
|---|---|
docker run |
Starts a container |
-d |
Runs container in detached mode |
-p 3000:3000 |
Maps localhost port 3000 to container port 3000 |
flight-optimizer |
Docker image name |
The project supports Kubernetes-based deployments for scalable container orchestration.
- Automated deployments
- Replica management
- Service exposure
- Rolling updates
- Pod health checks
- Zero-downtime deployments
kubectl apply -f kubernetes/kubectl get podskubectl get svckubectl rollout restart deployment flight-optimizerThe project includes a complete Jenkins automation pipeline.
GitHub Push
↓
Jenkins Webhook Trigger
↓
Install Dependencies
↓
Run Tests
↓
Build Docker Images
↓
Push Images
↓
Deploy to Kubernetes
↓
Verify Deployment
Frontend and backend Docker images can be built in parallel to reduce deployment time.
Environment variables are securely managed using Jenkins credentials and injected during build/deployment.
Deployment verification stage checks:
- Pod availability
- Kubernetes service health
- Successful rollout
Uses:
kubectl rollout restart deployment <deployment-name>to ensure the newest containers are deployed safely.
GitHub webhooks automatically trigger Jenkins builds whenever new commits are pushed.
pipeline {
agent any
stages {
stage('Install Dependencies') {
steps {
sh 'npm install'
}
}
stage('Build Docker Image') {
steps {
sh 'docker build -t flight-optimizer .'
}
}
stage('Deploy to Kubernetes') {
steps {
sh 'kubectl apply -f kubernetes/'
}
}
}
}GitHub Repository
↓
Jenkins
↓
Docker Build & Push
↓
Kubernetes Cluster
↓
Frontend + Backend Pods
↓
User Access
- JWT Authentication
- Protected API Routes
- Environment Variable Protection
- Secure MongoDB Atlas Connection
- Jenkins Secret Credential Injection
- Kubernetes Secret Support
The project benchmarks graph algorithms using generated route datasets.
Metrics include:
- Route calculation speed
- Memory usage
- Graph traversal performance
- Weighted vs unweighted path efficiency
Resolved incorrect API path concatenation that caused:
404 Not Found
errors after hard refreshes.
- Centralized Axios base URL handling
- Unified API route management
- Improved Vite proxy configuration
Migrated environment configuration handling to:
writeFilefor safer and more reliable secret injection.
Added a dedicated:
Verify Deployment
stage inside Jenkins pipeline to immediately confirm:
- Pods are running
- Services are accessible
- Rollouts completed successfully
- Added parallel build execution
- Improved Docker layer caching
- Explicit directory context handling
- Faster CI execution time
- Real-time flight tracking
- Redis caching
- Graph visualization dashboard
- Microservices architecture
- Helm charts for Kubernetes
- GitHub Actions integration
- AWS EKS deployment
- Prometheus & Grafana monitoring
- AI-based route prediction
git status
git add .
git commit -m "message"
git push origin maindocker build -t flight-optimizer .
docker images
docker ps
docker stop <container-id>
docker rm <container-id>kubectl get pods
kubectl get svc
kubectl apply -f deployment.yaml
kubectl describe pod <pod-name>
kubectl logs <pod-name>systemctl status jenkins
systemctl restart jenkinsContributions are welcome.
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to your branch
- Open a Pull Request
This project is licensed under the MIT License.
Developed by Hridayesh Debsarma
Passionate about:
- Full-Stack Development
- DevOps
- Algorithms & DSA
- Cloud Computing
- System Design
If you found this project useful:
⭐ Star the repository 🍴 Fork the project 📢 Share with others