Welcome to Natours! This full stack web application is designed specially for persons who love travelling and going on tour vacations.
This was developed under the guidance of Jonas Schmedtmann's Node.js course that consists of
- 📃How to create an API
- 🎮MVC Architecture
- 👩💻User Authentication
- 📚Data Modelling
- 🤳File Uploading
- 📌Realtime Map integeration using Mapbox
and much more 😉
- Node.js
- Express.js
- MongoDB
- Mongoose
- HTML, CSS
- Pug (Template Engine)
- Mailtrap
- Mapbox
- Stripe
- JSON Web Token
- bcrypt
- Nodemailer
- Gmail
- Browse and book a variety of nature tours.
- Signup and create your own account!
- Login to your account!
- Each login session is persisted using cookies
- Detailed information about each tour, including duration, difficulty, and price.
- Interactive maps to visualize tour destinations.
- Tour reviews and ratings by fellow travelers.
- Reset your password
- Update your password and profile
- Stripe payment checkout gateway 💸
- Upload Profile Picture
- Email service 📨
- Responsive for Mobiles, Laptops and PC 📱
Follow these steps to set up your local environment for the Natours app:
-
Clone the Repository: Clone this repository to your local machine:
git clone https://github.com/alin00r/natours.git cd natours
-
Install Dependencies: Run the following command to install all the required dependencies:
npm install
-
Configure Environment Variables:
Before you can run the Natours app, you need to set up your environment variables. These variables store sensitive information required for the app to function properly. Follow these steps to configure your environment variables:
-
Create a
.env
File: In the root directory of the app, create a file named.env
. -
Add the Following Environment Variables: Replace the placeholders with your actual information. You might need to sign up for accounts and services to obtain the required credentials.
# MongoDB Configuration DATABASE=your-mongodb-database-url USERNAME=your-mongodb-username DATABASE_PASSWORD=your-mongodb-password # JSON Web Token Configuration SECRET=your-json-web-token-secret JWT_EXPIRES_IN=90d JWT_COOKIE_EXPIRES_IN=90 # Stripe Configuration STRIPE_SECRET_KEY=your-stripe-secret-key STRIPE_WEBHOOK_SECRET=your-stripe-webhook-secret
-
If you want to test the payment, please do not provide your secure information. So, we can use the following credit card that's available on the stripe docs.
credit card: 4242 4242 4242 4242 // VISA
m/y: 12/34
cvv: 567
100 request per hour.
Natours API use four (04) operators:
- $gt: greater than to a value specified
- $gte: greater than or equal to a value specified
- $lt: less than to a value specified
- $lte: less than or equal to a value specified
During API development, I use Postman
for handling/testing all endpoints.
- Postman collection/documentation is available on this link click here
- Base URL endpoints:
http://127.0.0.1:3000/api/V1/
orhttp://localhost:3000/api/v1/
Explore the Natours app in action: