This is a Travel Booking System that allows users to search for real-time flights and provides authentication functionality.
Travel Booking Systems come in various forms, including flights, hotels, and transport. This project focuses on real-time flight search functionality. Key features include:
- User Authentication: Users can register and log in securely.
- Route Protection: Certain routes are protected and accessible only to authenticated users.
- Cloud Database: MongoDB Atlas is used as the cloud database for storing user information and booking history.
- API Integration: The project uses the aviationstack API to provide real-time flight information, including status, airports, flights, history, and availability around specific locations.
- Dynamic Rendering: Flight data retrieved from the API is dynamically rendered on the website.
- Express.js: The project is built on the Express.js framework, making it highly efficient and scalable.
To set up and run this project locally, follow these steps:
-
Clone this repository to your local machine.
-
Install the required dependencies by running:
npm install
-
Create a .env file in the project root directory and add the following environment variables-
- API_KEY = YOUR AVIATIONSTACK API KEY- you get this after you sign up in aviation stack MONGODB_URI = YOUR MONGODB URI atlas or local
-
Start the application:
npm start
ORnpm run dev
to run with nodemon -
Open your web browser and access the application at
http://localhost:3000
.
- Open
http://localhost:3000
in your browser. - Register yourself with any fake email and fake password. DO NOT USE ORIGINAL EMAIL OR PASSWORD.
- Login with your email and password.
- Enter details in the form.
- Click Search.
- After few seconds, you will see real time flights based on any IATA you provided for departure and arrival and the flight status.
- Website design is responsive and below (near the footer) are my social media links, feel free to connect or reach out or provide more suggestions.
- Finally you can logout by clicking the button at the top right corner.
- Node.js
- Express.js
- MongoDB Atlas
- Passport.js
- BCrypt
- Aviationstack API
- EJS and EJS layouts
- axios
- mongoose
- connect-flash
- express-session and dotenv
- This is a 0 cost project and thus comes with some limitations-
- API is only restricted for 1000 calls and only allows iata codes and current date only.
- In the form, if you want to search for international flights, enter the IATA code of the city or aitport at departure and arrival inputs respectively otherwise choose your indian city from the list provided in the form
- Hotels and car booking is not available as all the APIs for that are paid and this is a free project. Flight bookings also cannot be implemented in real as it may cost more money.
- Search for free or cheap APIs for hotels, car bookings and flight bookings
- Implement Google Auth and more powerful authentication features
- Forgot password feature
- Deploying the website to a secure domain
- Adding rate limits and protection against sql injections or dos attacks
- Scaling up the database to a more reliable one