Borto2an Airways is a flight reservation website that allows you to travel the world by searching and reserving flights from different airline companies. All your flights are now at one place with a couple of clicks away! 😃
This project is done in groups of 5 for the Advanced Computer Lab (ACL) 2021 at the German University in Cairo. It's the practical extension to the Software Engineering course where we were required to learn the software development lifecycle and follow the agile methodology. We tried to follow the industry best practices as much as we can to get the most out of it.
Borto2an Airways went through 3 sprints, each took approximately 3 weeks. Each sprint was addressing some functional and non-functional requirements. Finally, the project came to an end. Borto2an is currently available only on local host. So, stay tuned for our launch! 😃
Note: This project is done for educational purposes only. Please, don't use your real credit card to pay inside the website.
We followed the standard JavaScript coding style and naming conventions.
You can find screenshots and walk-through video of our cool website Here.
- MERN Stack (MongoDB, Express JS, React JS and Node JS) for development.
- Git for version control and GitHub for collaboration.
- MUI components in frontend.
- Stripe API for payment.
- Node Mailer for sending emails.
- JWT for authorization.
- Heroku for deployment (soon)
- Clone this repo into your computer.
- Go to Borto2an- Folder.
- Open your terminal and install backend dependencies using
npm install
. - Go to client Folder
cd /client
. - Install frontend dependencies using
npm install
. - Create .env file in Borto2an- Folder where you will add sensitive keys and variables.
- Run the project using
npm run conc
.
You must have Node JS installed on your machine. It also comes with NPM which we need to run the project.
Key | Usage |
---|---|
MONGODB_URI | Mongo DB URI to connect to database |
ACCESS_TOKEN_SECRET | Secret key for hashing access tokens |
REFRESH_TOKEN_SECRET | Secret key for hashing refresh tokens |
STRIPE_PRIVATE_KEY | Stripe key of your account to accept payments |
BORTO_PW | Password of Borto2an email for Node Mailer |
You can request access to our environment variables Here
Here are some of the features in Borto2an Airways:
- Three types of users: Admin - Guest - Registered User.
- Admin can create, search, update, and delete flights.
- Guest/Registered users can search flights by dates, departure, and destinations airports.
- There are Economy, Business, and First class cabins available to choose from, each with different baggage and price.
- Registered user is able to select seats and pay for flights using his credit card.
- Registered user can create, update, and delete his reservations.
- Emails are sent to users with reservation details or updates.
- Secure payment using Stripe API.
- Hashed passwords and secured endpoints using JWT.
Bonus features:
- If you forgot password, an email will be sent to you to reset it.
The functional and non-functional requirements for this project can be found Here.
The server contains several endpoints, each of them is secured and made only available for specific users.
- For detailed API documentation, download and run the project on your local machine, and then go to
http://localhost:8000/api-docs
Endpoint | Usage |
---|---|
GET / |
Search flights based on search criteria |
GET /showAllflights |
Get all flights |
POST / |
Create a new flight |
PUT / |
Update an existing flight |
DELETE /:id |
Delete flight with given id |
Endpoint | Usage |
---|---|
GET / |
Get airplane models based on search criteria |
GET /:id |
Get airplane model with given id |
GET /showAllModels |
Get all airplane models |
POST / |
Create a new airplane model |
PUT / |
Update an existing airplane model |
DELETE /:id |
Delete airplane model with given id |
Endpoint | Usage |
---|---|
GET / |
Get all reservations of a user |
GET /sendItinerary/:id |
Send details of the reservation with given id to the user's email |
POST / |
Create a new Reservation |
PUT / |
Update an existing Reservation |
DELETE /:id |
Delete Reservation with given id |
Endpoint | Usage |
---|---|
GET / |
Get all users |
GET /:id |
Get user with given id |
POST /register |
Create a new user |
PUT / |
Update an existing user's info |
PUT /password |
Update an existing user's password |
DELETE /:id |
Delete user with given id |
Endpoint | Usage |
---|---|
POST /login |
login user and return his access token |
POST /reset |
reset password of a given user |
POST /refreshToken |
Refresh the expired access token of a user |
DELETE /logout |
logout user with given access token |
Endpoint | Usage |
---|---|
POST /create-session |
create a new Stripe payment session for a given reservation |
A typical user journey on Borto2an Airways is as follows:
- Create or sign in into your account.
- Search for flights in the home page and specify your start and destination.
- Choose the most suitable departure and return flights, along with the preferred cabin.
- Select the seats from the list of available seats.
- See a summary of your reservation, in addition to the price to be paid.
- Pay for your reservation using credit card. You have successfully reserved your flight.
- Go to your profile and see all your reservations.
- Edit or delete your reservations as you wish.
If you are still confused on how to use our website, please refer to our demonstration video.
If you want to contribute to this project, email me at [email protected]. You are welcome to contribute at any time, and your effort is highly appreciated.
Borto2an is up and running thanks to the effort of these people.