A modern flight search web application built with Flask and Firebase, featuring multi-currency support and comprehensive airport coverage.
- π Firebase Authentication - Google Sign-In and Email/Password
- π Multi-Currency Support - 23+ currencies with real-time conversion
βοΈ Comprehensive Airport Database - 150+ international airports- π¨ Modern UI - Glassmorphism design with responsive layout
- π Advanced Search - Price filters, travel class selection, passenger count
- π± Mobile Responsive - Optimized for all device sizes
- π Real-time Results - Live flight search with detailed information
Deploy your own instance to Vercel and add the URL here!
- Frontend: HTML5, CSS3, JavaScript (Vanilla)
- Backend: Python Flask
- Authentication: Firebase Authentication
- Flight Data: Amadeus for Developers API
- Styling: Modern CSS with glassmorphism effects
-
Firebase Project
- Create a Firebase project at Firebase Console
- Enable Authentication with Email/Password and Google providers
- Download service account key (JSON file)
-
Amadeus API
- Register at Amadeus for Developers
- Create a new application to get Client ID and Client Secret
- Use the test environment initially
-
Python Environment
- Python 3.7 or higher
- pip package manager
# Navigate to project directory
cd "Check Flight Status"
# Install Python dependencies
pip install -r requirements.txtCreate a .env file in the project root:
# Amadeus API Credentials
AMADEUS_CLIENT_ID=your_amadeus_client_id_here
AMADEUS_CLIENT_SECRET=your_amadeus_client_secret_here
# Firebase Admin SDK
FIREBASE_SERVICE_ACCOUNT_KEY=path/to/your/firebase-service-account-key.json-
Get Firebase Config:
- Go to Firebase Console β Project Settings β General
- Scroll down to "Your apps" and click "Web app"
- Copy the config object
-
Update JavaScript Config:
- Open
script.js - Replace the
firebaseConfigobject with your actual config:
- Open
const firebaseConfig = {
apiKey: "your-actual-api-key",
authDomain: "your-project-id.firebaseapp.com",
projectId: "your-project-id",
storageBucket: "your-project-id.appspot.com",
messagingSenderId: "your-sender-id",
appId: "your-app-id"
};- Download Service Account Key:
- Go to Firebase Console β Project Settings β Service Accounts
- Click "Generate new private key"
- Save the JSON file and update the path in
.env
In Firebase Console:
- Go to Authentication β Sign-in method
- Enable "Email/Password"
- Enable "Google" and configure OAuth consent screen
# Start the Flask backend
python app.pyThe application will be available at: http://localhost:5000
Check Flight Status/
βββ app.py # Flask backend with API endpoints
βββ index.html # Main HTML file with auth and search UI
βββ style.css # Responsive CSS with glassmorphism design
βββ script.js # Frontend JavaScript with Firebase auth
βββ requirements.txt # Python dependencies
βββ .env # Environment variables (create this)
βββ .gitignore # Git ignore file
βββ README.md # This fileGET /- Serve the main applicationGET /api/health- Health check endpointPOST /api/flights/search- Search flights (requires authentication)GET /api/airports/search- Airport search for autocomplete
All flight search endpoints require a valid Firebase ID token in the Authorization header:
Authorization: Bearer <firebase-id-token>
-
Authentication:
- Open the website
- Sign up with email/password or use Google Sign-In
- Once logged in, you'll see the flight search interface
-
Search Flights:
- Enter origin and destination airport codes (e.g., CCU, BKK)
- Optionally select departure date and price range
- Click "Search Flights" to get results
-
View Details:
- Click on any flight card to see detailed information
- View airline details, flight times, and amenities
- The project uses Amadeus test environment by default
- Test environment has limited data but doesn't require payment
- For production, change
AMADEUS_BASE_URLto production endpoint - Mock data is used as fallback when API is not configured
- ID tokens are verified on the backend using Firebase Admin SDK
- Only authenticated users can access flight search endpoints
- Tokens expire automatically and need refresh
Development:
- Uses mock flight data if Amadeus API is not configured
- Debug mode enabled in Flask
- Detailed error logging
Production:
- Configure real Amadeus API credentials
- Set Flask debug mode to False
- Use environment variables for all secrets
- Deploy with proper HTTPS
-
Firebase Authentication Error:
- Check if Firebase config is correct in
script.js - Verify that authentication providers are enabled
- Ensure service account key path is correct
- Check if Firebase config is correct in
-
Amadeus API Error:
- Verify API credentials in
.envfile - Check if API quota is not exceeded
- Ensure airport codes are valid IATA codes
- Verify API credentials in
-
CORS Issues:
- Flask-CORS is configured to allow all origins in development
- For production, configure specific allowed origins
-
Module Import Errors:
- Ensure all dependencies are installed:
pip install -r requirements.txt - Use virtual environment for better dependency management
- Ensure all dependencies are installed:
# Create virtual environment
python -m venv flight-search-env
# Activate virtual environment
# Windows:
flight-search-env\Scripts\activate
# Linux/Mac:
source flight-search-env/bin/activate
# Install dependencies
pip install -r requirements.txt- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.
For issues and questions:
- Check the troubleshooting section
- Review Firebase and Amadeus documentation
- Check browser console for JavaScript errors
- Review Flask logs for backend errors
- Never commit
.envfile or service account keys to version control - Use HTTPS in production
- Regularly rotate API keys and secrets
- Implement rate limiting for production use
- Validate all user inputs on both frontend and backend