An awesome tour booking web app written in NodeJS, Express, MongoDB π½FEATURES MONGOOSE AND PUG WITH EXTRA THINGS API OF MAP BOX,STRIPE,SENDGRID EMAIL API SYSTEM) Authentication and Authorization Sign up Log in Logout Update Reset password User Profile Update username, photo, email, password, and other information
FEATURE MONGOOSE AND PUG WITH EXTRA THINGS API OF MAP BOX,STRIPE,SENDGRID EMAIL API SYSTEM)
Authentication and Authorization
Sign up
Log in
Logout
Update
Reset password
User Profile
Update username, photo, email, password, and other information
User roles: regular user, admin, lead guide, guide
Tour Management
Create tours (admin/lead guide)
View tours (all users)
Update tours (admin/lead guide)
Delete tours (admin/lead guide)
Booking
Regular users can book tours (with payment)
Regular users cannot book the same tour twice
View booked tours (regular users)
View all bookings (admin/lead guide)
Delete bookings (admin/lead guide)
Create bookings manually (admin/lead guide, without payment)
Cannot create duplicate bookings for the same user (admin/lead guide)
Edit bookings (admin/lead guide)
Reviews
Write reviews for booked tours (regular users)
View reviews for each tour (all users)
Edit and delete own reviews (regular users)
Cannot review the same tour twice (regular users)
Delete reviews (admin)
Favorite Tours
Add booked tours to favorites (regular users)
Remove tours from favorites (regular users)
Cannot add tour to favorites if already favorited (regular users)
Credit Card Payment
https://github.com/lgope/Natours/assets/102612436/a1b1359b-7b37-4498-a2dc-6286051056bc
https://github.com/lgope/Natours/assets/102612436/69110424-a753-4519-9fbb-476074967209
TECH USED Node.js Fundamentals:
- Card No. : 4242 4242 4242 4242
- Expiry date: 02 / 22
- CVV: 222
Before using the API, you need to set the variables in Postman depending on your environment (development or production). Simply add:
- {{URL}} with your hostname as value (Eg. http://127.0.0.1:3000 or http://www.example.com)
- {{password}} with your user password as value.
Check Natours API Documentation for more info.
API Features:
Tours List ππ» https://lgope-natours.onrender.com/api/v1/tours
Tours State ππ» https://lgope-natours.onrender.com/api/v1/tours/tour-stats
Get Top 5 Cheap Tours ππ» https://lgope-natours.onrender.com/api/v1/tours/top-5-cheap
Get Tours Within Radius ππ» https://lgope-natours.onrender.com/api/v1/tours/tours-within/200/center/34.098453,-118.096327/unit/mi
The website is deployed with git into Heroku. Below are the steps taken:
git init
git add -A
git commit -m "Commit message"
heroku login
heroku create
heroku config:set CONFIG_KEY=CONFIG_VALUE
parcel build ./public/js/index.js --out-dir ./public/js --out-file bundle.js
git push heroku master
heroku open
You can also change your website URL by running this command:
heroku apps: rename natours-users