An awesome tour booking site built on top of NodeJS.
• Key Features
• Build With
• Demonstration
• Live
• How To Use
• API Usage
• Installation
• Contributing
• Future Updates
• Acknowledgement
- Authentication and Authorization
- Sign up, Log in, log out, Update, and reset password.
- A user can be either a regular user or an admin or a lead guide or a guide.
- User profile
- Update username, photo, email, password, and other information
- When a user signs up, that user by default regular user.
- Tour
- Manage booking, check tour map, check users' reviews and rating
- Tours can be seen by every user.
- Admins and tour guides can create, update, and delete tours
- Bookings
- Only regular users can book tours (make a payment).
- Regular users can not book the same tour twice.
- Regular users have an overview of all the tours that they have booked.
- Admins and tour guides can create, update, and delete any booking
- Reviews
- Only regular users can write reviews for tours that they have booked.
- All users can see the reviews of each tour.
- An admin can delete any review.
- Credit card Payment
- Node.js - JavaScript runtime for building the backend and handling server-side logic.
- Express - Minimalist web framework for Node.js.
- Mongoose - ODM library for MongoDB to manage application data.
- MongoDB Atlas - Managed cloud database service for MongoDB.
- Pug - High-performance template engine for dynamic content rendering.
- JWT - Secure token-based authentication and authorization.
- ESBuild - Fast bundler for optimizing project assets.
- Stripe - API for secure online payments.
- Postman - API testing tool.
- Mailtrap & Brevo - Services for email testing and production delivery.
- Render - Cloud platform for deployment.
- Leaflet - Library for interactive maps.
Live demo (Feel free to visit) 👉🏻 : https://natours-5bpr.onrender.com/
- Sign up/Login to the site
- Search for tours that you want to book
- Book a tour
- Proceed to the payment checkout page
- Enter the card details (Test Mood):
- Card No. : 4242 4242 4242 4242 - Expiry date: 02 / 22 - CVV: 222
- Finished!
- Check the tour you have booked on the "Manage Booking" page in your user settings. You'll be automatically redirected to this page after you have completed the booking.
- You can update your own username, profile photo, email, and password.
Before using the API, you need to set the URL variable 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)
Check Natours API Documentation for more info.
You can fork the app or you can git-clone the app into your local machine. Once done, please install all the dependencies by running
$ npm i
Set your env variables
$ npm run watch
$ npm run build
$ npm run dev (for development)
$ npm run start:prod (for production)
Setting up ESLint and Prettier in VS Code 👇🏻
$ npm i eslint prettier eslint-config-prettier eslint-plugin-prettier eslint-config-airbnb eslint-plugin-node
eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react --save-dev
Pull requests are welcome but please open an issue and discuss what you will do before 😊
- Advanced Authentication features
- Two-factor authentication
- Confirm email
- Keeping users logged in by using refresh tokens
- Improve overall UX/UI and fix bugs
- Featured Tours
- Recently Viewed Tours
- And More! There's always room for improvement!
This project is open-sourced under the MIT license.
- This project is part of the online course I've taken at Udemy. Thanks to Jonas Schmedtmann for creating this awesome course! Link to the course: Node.js, Express, MongoDB & More: The Complete Bootcamp 2019