Flight Finder is a React-based web application that allows users to search and browse flight options between two cities. It utilizes the Sky Scrapper API from RapidAPI to fetch flight data and present it in a user-friendly interface.
google-flight-finder loom demo
- Overview
- Features
- Technologies Used
- API Integration
- Setup and Installation
- Usage
- Folder Structure
- Contributing
- License
Flight Finder provides a simple and intuitive interface for users to search for flights between different cities on a selected date. The application displays flight details such as the airline name, departure and arrival times, duration, and ticket prices. The Sky Scrapper API is used to pull real-time flight data, ensuring the information is up-to-date.
- Flight Search: Search for flights by specifying the origin, destination, and date of travel.
- API Integration: Fetches live flight data using the Sky Scrapper API from RapidAPI.
- Flight Display: View detailed information about each flight, including airlines, timings, duration, stops, and prices.
- Responsive Design: Optimized for different screen sizes, ensuring usability on both desktop and mobile devices.
- React: Frontend library for building the user interface.
- Material-UI: For designing and styling the application components.
- Axios: For making API requests to the Sky Scrapper API.
- Prop-Types: For prop validation in React components to maintain code quality.
- ESLint and Prettier: For linting and formatting the codebase to ensure consistency and quality.
This project uses the Sky Scrapper API from RapidAPI to fetch flight information. The API provides real-time flight data based on the user's selected origin, destination, and travel date. Make sure to sign up for an API key on RapidAPI and configure it in the project to enable API requests.
- Go to RapidAPI and create an account (if you don't have one).
- Subscribe to the Sky Scrapper API.
- Copy your API key.
- Create a
.env
file in the root of your project and add your API key:REACT_APP_RAPIDAPI_KEY=your-api-key-here
- Restart your development server to apply the changes.
To run this application locally, follow these steps:
-
Clone the repository:
git clone https://github.com/webboxesdeveloper/google-flight-search.git cd flight-search
-
Install dependencies: Make sure you have Node.js installed, then run:
npm install
-
Run the development server:
npm start
The application should now be running at
http://localhost:3000
. -
Lint the code (optional): To check and fix linting issues, run:
npm run lint
- Open the application in your browser at
http://localhost:3000
. - Enter the origin city, destination city, and choose a travel date.
- Click on the "SEARCH" button to retrieve and view the available flights.
- The results section displays each flight’s details, including:
- Airline name
- Departure and arrival times
- Duration of the flight
- Stops (e.g., non-stop or with layovers)
- Price
- Use the filter options to narrow down the flight results based on your preferences.
- Choose a sorting option to rearrange the flights according to price, departure time, etc.
- components/: Contains the React components used in the application, such as
FlightSearch
andFlightResults
. - api/: Houses the logic for making API calls to fetch flight data using Axios.
- App.js: The main component that integrates and manages the flight search and results display.
- index.js: The entry point for the React application.
Contributions are welcome! To contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature
). - Make your changes and commit them (
git commit -m 'Add new feature'
). - Push the changes to your branch (
git push origin feature/your-feature
). - Open a pull request describing your changes.
Please ensure your code is well-documented and formatted according to the project’s coding conventions.
This project is licensed under the MIT License. See the LICENSE file for more information.