Description
A Project on Airline Ticket Booking Back-End System
Project Title : Air-India-Clone BackEnd App
Project by : Pallab Nandi
A BackEnd application for ticket booking system built on MVC(Model-View-Controller) architecture. The technologies uses on this application are - NodeJS, ExpressJS, bcryptJS, Mongoose and passportJS. This application uses MongoDB technology to interact with DataBase. Important key features this application contains are :-
- User SignUp and LogIn feature
- Ticket Booking System
- Review System on Journey
- Airlines, Flights and Users CRUD operation for Admin only
- uses JWT and PassportJS for Authorization and Authentication
The current project is deployed on the cyclic.sh platform. Therefore, the root directory for the API is pallabnandi-airindia-app.cyclic.app
For Airlines CRUD operation, the common route is /api/v1/airline
. Now the following operations are :
/all
- to fetch all airlines/{name}
- to fetch according as Airline Name/add
- to add new Airline (Only accessable by Admin)/{name}/edit
- to update the specific Airline (Only accessable by Admin)/{name}?delete=true
- to delete the specific Airline (Only accessable by Admin)
For Flights CRUD operation, the common route is /api/v1/flight
. Now the following operations are :
-
/all
- to fetch all flights -
/{name}
- to fetch according as Flight Name -
/add
- to add new Flight (Only accessable by Admin) -
/{name}/edit
- to update the specific Flight (Only accessable by Admin) -
/{name}?delete=true
- to delete the specific Flight (Only accessable by Admin)
For Searching and Filters: -
?sort={Sort Parameter}&sortType={asc/desc}
- To sort the result according as ascending or descending -
?minPrice={price}
- To get according as minimum Price -
?maxPrice={price}
- To get according as maximum Price -
?parameter={name}
- To get according as airline or flight-name or arrival or departure airport as parameter and with their name to filter
For Users CRUD operation, the common route is /api/v1/user
. Now the following operations are :
-
/all
- to fetch all users (Only accessable by Admin) -
/add
- to add all users (Only accessable by Admin) -
/{username}/edit
- to update the specific user (Only accessable by Admin) -
/{username}?delete=true
- to delete the specific user (Only accessable by Admin)
For Searching and Filters: -
?parameter={name}
- To filter the result according as parameter (name, username, email) with name
For Ticket CRUD operation, the common route is /api/v1/ticket
. Now the following operations are :
-
/all
- to fetch all Tickets with status 'In-Process', 'Booked' or 'Cancelled' (Only accessably by Authenticate User) -
/view?status={type}
- to fetch all Tickets with status type (Only accessably by Authenticate User) -
/add
- to book new Ticket (Only accessable by Authenticate User) -
/{id}
- to get the Ticket by ID (Only accessable by Authenticate User) -
/{id}/edit
- to update the specific ticket (Only accessable by Admin) -
/{id}?cancel=true
- to cancel the ticket by Authentic user -
/{id}?delete=true
- to delete the specific category (Only accessable by Admin)
For Searching and Filters: -
?sort={Sort Parameter}&sortType={asc/desc}
- To sort the result according as ascending or descending -
?minPrice={price}
- To get according as minimum Price -
?maxPrice={price}
- To get according as maximum Price -
?parameter={name}
- To get according as airline or flight-name or departure date as parameter and with their data to filter
For Review CRUD operation, the common route is /api/v1/review
. Now the following operations are :
-
/all
- to fetch all Reviews -
/{ticketID}/add
- to add new Review (Only accessable by Authenticate User) -
/{id}
- to get the Review by ID (Only accessable by Authenticate User) -
/{id}/edit
- to update the specific review (Only accessable by Authenticate User) -
/{id}?delete=true
- to delete the specific category (Only accessable by Authenticate User)
For Searching and Filters: -
?sort={Sort Parameter}&sortType={asc/desc}
- To sort the result according as ascending or descending -
?minRating={price}
- To get according as minimum Rating -
?maxRating={price}
- To get according as maximum Rating -
?flight={name}
- To get according as flight
For Auth, the common route is /api/v1/auth
. Now the following operations are :
/signup
- to register self as new user./login
- to login self.
To clone the application on the local system, one must go through these prerequisite -
- Must have Git install on the system
- Technology needed to run the app - NodeJS
- And MongoDB should be installed on the system
If one follows these prerequisite, then proceed the step as follow
- Open Terminal (on MAC or Linux) or Git Bash (on Windows) and run the following command -
git clone https://github.com/pallab-nandi/ecommerce-be-app.git
- Now go to Project directory and run
npm install
command to install necessary dependencies.
- With everything ready just run the command
node ./index.js
ornpm start
to start the application.
Note : Before starting application change dbConfig.prodcution
into dbConfig.development
in connections/mongodb.connect.js
file so that it wouldn't hamper with the production database. And do change the necessary details in config/config.json
file to connect with the local database.
The current version of the application is v1.0.0