Natours is a tours booking website built with the following technologies:
- Node.js: Runtime environment for executing JavaScript.
- Express: Web application framework for Node.js.
- MongoDB: NoSQL database for storing and retrieving data.
- Mongoose: ODM for MongoDB, providing a schema-based solution to model data.
- Pug: Template engine for rendering HTML.
Natours offers a robust set of features, including:
- Sign up: Users can register for an account.
- Login: Registered users can log in with email and password.
- Forgot and Reset Password: Users can reset their passwords if forgotten.
- Users can manage their profiles and view bookings.
- Users can book tours and manage bookings.
- Admins can manage tour listings, including CRUD operations.
- Secure payment integration using Stripe for tour bookings.
- Perform Create, Read, Update, and Delete operations on the following models:
- Tours: For managing available tours.
- Users: For managing user data.
- Reviews: For users to add reviews for tours.
- Bookings: For managing bookings made by users.
- Aggregation Pipelines: Used for complex data queries.
- Geospatial Queries: Allows querying tours based on user location.
- Filtering: Allows filtering data based on user preferences (e.g., tour duration, price).
- Sorting: Enables sorting tours by various attributes (e.g., price, rating).
- Limiting Fields: Limits the number of fields returned in responses.
- Pagination: Enables fetching data in chunks.
- Complex error handling mechanism for capturing and displaying errors.
- Complex email handling system for sending confirmation, notification, and password reset emails.
- Maps are integrated to show tour locations.
- The application follows the Model-View-Controller (MVC) architecture for better separation of concerns.
- Node.js: Backend JavaScript runtime.
- Express: Web framework for Node.js.
- MongoDB: NoSQL database.
- Mongoose: ODM for MongoDB.
- Pug: Template engine for rendering views.
To get started with the Natours project, follow these steps:
git clone https://github.com/farahmahfouz/Booking-App.gitnpm install- Configure environment variables like MongoDB URI, JWT secret, etc. You can use a
.envfile for this purpose.
npm startThe server will start, and the application will be accessible at http://localhost:3000.
For detailed documentation of the available API endpoints, refer to the following:
- API Documentation: Postman API Documentation
This documentation covers:
- Authentication (login, signup, password reset)
- Tour CRUD operations
- User profile management
- Booking management
- Advanced data querying (filtering, sorting, pagination)
- Geospatial queries
- Farah Mahfouz (@farahmahfouz): Main contributor and developer.
This project is part of Jonas Schmedtmann's course "Node.js, Express, MongoDB & More: The Complete Bootcamp 2024" on Udemy.
Let me know if you need any further adjustments!