- Name : Thenuri Sandara
- Name : Samadee Kularatne
- Name : Sachintha Lakmin
This is a web application that has been develped as part of the semeter break project to book buses where forigners can book buses to go on trips and also there is a option for bus owrners to add there buses so that people can hire them.
This application is developed for the purpose of learning fullstack development.
This application is developed using NodeJS , ExpressJS , HTML , CSS , Bootstrap , EJS.Google Distance Matrix API is used for calculating the distance between two locations when booking a bus.
View Project Requirement Analysis
The Postman API Collection is avaliable here Postman API Collection
- Login functionality
- Edit profile functionality
- Logout functionality
- Dashboard viewing functionality
- View Bus/Van details
- View Filtered Price Details (low to high/ high to low)
- Chat functionality
- Approval of new Bus or Van
- Termination of Bus or Van owner accounts
- Owner registration
- Confirm booking
- Cancel booking
- Add Bus/Van
- Edit Bus/Van details
- Remove Bus/ Van
- Customer registration
- Book a Bus/Van
- Give a rating/review for previous bookings.
- Cancel booking
- Filter and sort vehicles
Below are the screenshots of the Booking system
-
Clone the repo
git clone https://github.com/Thenuri/G01-COMF4004-22
-
Install NPM packages
npm install
-
Copy the .env.example file and rename it to .env
cp .env.example .env
-
Add the database credentials to the .env file
DB_HOST=localhost DB_PORT=3306 DB_USER=root DB_DATABASE=book-my-bus
-
Import the database
Import the database from the database folder to your database server
-
Add the google maps api key to the .env file
GOOGLE_MAPS_API_KEY=
Note
If you don't have a google maps api key you can get one from here
-
Generate JWT secret key
Run node in terminal, generate token with the following
require('crypto').randomBytes(64).toString('hex')
More info: https://www.digitalocean.com/community/tutorials/nodejs-jwt-expressjs
Add the generated key to the .env file
JWT_SECRET=
-
Run the application
npm start