25
25
26
26
## Key Features 📝
27
27
28
- * Authentication and Authorization
28
+ - Authentication and Authorization
29
29
- Sign up, Log in, Logout, Update, and reset password.
30
- * User profile
30
+ - User profile
31
31
- Update username, photo, email, password, and other information
32
32
- A user can be either a regular user or an admin or a lead guide or a guide.
33
33
- When a user signs up, that user by default regular user.
34
- * Tour
34
+ - Tour
35
35
- Manage booking, check tour map, check users' reviews and rating
36
36
- Tours can be created by an admin user or a lead-guide.
37
37
- Tours can be seen by every user.
38
38
- Tours can be updated by an admin user or a lead guide.
39
39
- Tours can be deleted by an admin user or a lead-guide.
40
- * Bookings
40
+ - Bookings
41
41
- Only regular users can book tours (make a payment).
42
42
- Regular users can not book the same tour twice.
43
43
- Regular users can see all the tours they have booked.
46
46
- An admin user or a lead guide can create a booking (manually, without payment).
47
47
- An admin user or a lead guide can not create a booking for the same user twice.
48
48
- An admin user or a lead guide can edit any booking.
49
- * Reviews
49
+ - Reviews
50
50
- Only regular users can write reviews for tours that they have booked.
51
51
- All users can see the reviews of each tour.
52
52
- Regular users can edit and delete their own reviews.
53
53
- Regular users can not review the same tour twice.
54
54
- An admin can delete any review.
55
- * Favorite Tours
55
+ - Favorite Tours
56
56
- A regular user can add any of their booked tours to their list of favorite tours.
57
57
- A regular user can remove a tour from their list of favorite tours.
58
58
- A regular user can not add a tour to their list of favorite tours when it is already a favorite.
59
- * Credit card Payment
60
-
59
+ - Credit card Payment
61
60
62
61
## Demonstration 🖥️
62
+
63
63
#### Home Page :
64
+
64
65
![ natoursHomePageonline-video-cutt] ( https://user-images.githubusercontent.com/58518192/72606801-7ebe0680-3949-11ea-8e88-613f022a64e5.gif )
65
66
66
67
#### Tour Details :
68
+
67
69
![ tourOverviewonline-video-cutterc] ( https://user-images.githubusercontent.com/58518192/72606859-a0b78900-3949-11ea-8f0d-ef44c789957b.gif )
68
70
69
71
#### Payment Process :
72
+
70
73
![ paymentprocess-1-ycnhrceamp4-7fW] ( https://user-images.githubusercontent.com/58518192/72606973-d9eff900-3949-11ea-9a2e-f84a6581bef3.gif )
71
74
72
75
#### Booked Tours :
73
- ![ rsz_bookedtours] ( https://user-images.githubusercontent.com/58518192/72607747-6a7b0900-394b-11ea-8b9f-5330531ca2eb.png )
74
76
77
+ ![ rsz_bookedtours] ( https://user-images.githubusercontent.com/58518192/72607747-6a7b0900-394b-11ea-8b9f-5330531ca2eb.png )
75
78
76
79
#### User Profile :
80
+
77
81
![ rsz_userprofile] ( https://user-images.githubusercontent.com/58518192/72607635-44edff80-394b-11ea-8943-64c48f6f19aa.png )
78
82
79
83
#### Admin Profile :
80
- ![ rsz_adminprofile] ( https://user-images.githubusercontent.com/58518192/72607648-4d463a80-394b-11ea-972f-a73160cfaa5b.png )
81
84
85
+ ![ rsz_adminprofile] ( https://user-images.githubusercontent.com/58518192/72607648-4d463a80-394b-11ea-972f-a73160cfaa5b.png )
82
86
83
87
## How To Use 🤔
84
88
85
89
### Book a tour
86
- * Login to the site
87
- * Search for tours that you want to book
88
- * Book a tour
89
- * Proceed to the payment checkout page
90
- * Enter the card details (Test Mood):
90
+
91
+ - Login to the site
92
+ - Search for tours that you want to book
93
+ - Book a tour
94
+ - Proceed to the payment checkout page
95
+ - Enter the card details (Test Mood):
91
96
```
92
97
- Card No. : 4242 4242 4242 4242
93
98
- Expiry date: 02 / 22
94
99
- CVV: 222
95
100
```
96
- * Finished!
97
-
98
-
101
+ - Finished!
99
102
100
103
### Manage your booking
101
104
102
- * Check the tour you have booked on the "Manage Booking" page in your user settings. You'll be automatically redirected to this
105
+ - Check the tour you have booked on the "Manage Booking" page in your user settings. You'll be automatically redirected to this
103
106
page after you have completed the booking.
104
107
105
108
### Update your profile
106
109
107
- * You can update your own username, profile photo, email, and password.
110
+ - You can update your own username, profile photo, email, and password.
108
111
112
+ ## API Usage
109
113
114
+ Before using the API, you need to set the variables in Postman depending on your environment (development or production). Simply add:
110
115
111
- ## API Usage
112
- Before using the API, you need to set the variables in Postman depending on your environment (development or production). Simply add:
113
- ```
114
- - {{URL}} with your hostname as value (Eg. http://127.0.0.1:3000 or http://www.example.com)
115
- - {{password}} with your user password as value.
116
- ```
116
+ ```
117
+ - {{URL}} with your hostname as value (Eg. http://127.0.0.1:3000 or http://www.example.com)
118
+ - {{password}} with your user password as value.
119
+ ```
117
120
118
121
Check [ Natours API Documentation] ( https://documenter.getpostman.com/view/8893042/SW7c37V6 ) for more info.
119
122
@@ -127,10 +130,10 @@ Get Top 5 Cheap Tours 👉🏻 https://lgope-natours.onrender.com/api/v1/tours/t
127
130
128
131
Get Tours Within Radius 👉🏻 https://lgope-natours.onrender.com/api/v1/tours/tours-within/200/center/34.098453,-118.096327/unit/mi
129
132
130
-
131
-
132
133
## Deployment 🌍
134
+
133
135
The website is deployed with git into Heroku. Below are the steps taken:
136
+
134
137
```
135
138
git init
136
139
git add -A
@@ -142,38 +145,37 @@ parcel build ./public/js/index.js --out-dir ./public/js --out-file bundle.js
142
145
git push heroku master
143
146
heroku open
144
147
```
148
+
145
149
You can also change your website URL by running this command:
150
+
146
151
```
147
152
heroku apps: rename natours-users
148
153
```
149
154
150
-
151
155
## Build With 🏗️
152
156
153
- * [ NodeJS] ( https://nodejs.org/en/ ) - JS runtime environment
154
- * [ Express] ( http://expressjs.com/ ) - The web framework used
155
- * [ Mongoose] ( https://mongoosejs.com/ ) - Object Data Modelling (ODM) library
156
- * [ MongoDB Atlas] ( https://www.mongodb.com/cloud/atlas ) - Cloud database service
157
- * [ Pug] ( https://pugjs.org/api/getting-started.html ) - High performance template engine
158
- * [ JSON Web Token] ( https://jwt.io/ ) - Security token
159
- * [ ParcelJS] ( https://parceljs.org/ ) - Blazing fast, zero configuration web application bundler
160
- * [ Stripe] ( https://stripe.com/ ) - Online payment API and Making payments on the app.
161
- * [ Postman] ( https://www.getpostman.com/ ) - API testing
162
- * [ Mailtrap] ( https://mailtrap.io/ ) & [ Sendgrid] ( https://sendgrid.com/ ) - Email delivery platform
163
- * [ Heroku] ( https://www.heroku.com/ ) - Cloud platform
164
- * [ Mapbox] ( https://www.mapbox.com/ ) - Displaying the different locations of each tour.
165
-
166
-
157
+ - [ NodeJS] ( https://nodejs.org/en/ ) - JS runtime environment
158
+ - [ Express] ( http://expressjs.com/ ) - The web framework used
159
+ - [ Mongoose] ( https://mongoosejs.com/ ) - Object Data Modelling (ODM) library
160
+ - [ MongoDB Atlas] ( https://www.mongodb.com/cloud/atlas ) - Cloud database service
161
+ - [ Pug] ( https://pugjs.org/api/getting-started.html ) - High performance template engine
162
+ - [ JSON Web Token] ( https://jwt.io/ ) - Security token
163
+ - [ ParcelJS] ( https://parceljs.org/ ) - Blazing fast, zero configuration web application bundler
164
+ - [ Stripe] ( https://stripe.com/ ) - Online payment API and Making payments on the app.
165
+ - [ Postman] ( https://www.getpostman.com/ ) - API testing
166
+ - [ Mailtrap] ( https://mailtrap.io/ ) & [ Sendgrid] ( https://sendgrid.com/ ) - Email delivery platform
167
+ - [ Heroku] ( https://www.heroku.com/ ) - Cloud platform
168
+ - [ Mapbox] ( https://www.mapbox.com/ ) - Displaying the different locations of each tour.
167
169
168
170
## To-do 🗒️
169
171
170
- * Review and rating
172
+ - Review and rating
171
173
- Allow users to add a review directly at the website after they have taken a tour
172
- * Booking
174
+ - Booking
173
175
- Prevent duplicate bookings after a user has booked that exact tour, implement favorite tours
174
- * Advanced authentication features
176
+ - Advanced authentication features
175
177
- Signup, confirm user email, log in with refresh token, two-factor authentication
176
- * And More! There's always room for improvement!
178
+ - And More! There's always room for improvement!
177
179
178
180
## Setting Up Your Local Environment ⚙️
179
181
@@ -209,12 +211,14 @@ If you wish to play around with the code base in your local environment, do the
209
211
```
210
212
211
213
#### Demo-` .env ` file :
212
- ![ demo-env-file] ( https://github.com/lgope/Natours/assets/58518192/cf5b833f-2a48-48a1-aeb3-5ffea8967e33 )
213
214
215
+ ![ demo-env-file] ( https://github.com/lgope/Natours/assets/58518192/cf5b833f-2a48-48a1-aeb3-5ffea8967e33 )
214
216
215
217
## Installation 🛠️
218
+
216
219
You can fork the app or you can git-clone the app into your local machine. Once done, please install all the
217
220
dependencies by running
221
+
218
222
```
219
223
$ npm i
220
224
Set your env variables
@@ -230,26 +234,30 @@ eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react --save-dev
230
234
```
231
235
232
236
## Contributing 💡
237
+
233
238
Pull requests are welcome but please open an issue and discuss what you will do before 😊
234
239
235
240
## Known Bugs 🚨
241
+
236
242
Feel free to email me at
[email protected] if you run into any issues or have questions, ideas or concerns.
237
243
Please enjoy and feel free to share your opinion, constructive criticism, or comments about my work. Thank you! 🙂
238
244
239
245
## Future Updates 🪴
240
246
241
- * Enable PWA
242
- * Improve overall UX/UI and fix bugs
243
- * Featured Tours
244
- * Recently Viewed Tours
245
- * And More! There's always room for improvement!
247
+ - Enable PWA
248
+ - Improve overall UX/UI and fix bugs
249
+ - Featured Tours
250
+ - Recently Viewed Tours
251
+ - And More! There's always room for improvement!
246
252
247
253
## License 📄
254
+
248
255
This project is open-sourced under the [ MIT license] ( https://opensource.org/licenses/MIT ) .
249
256
250
257
## Deployed Version 🚀
258
+
251
259
Live demo (Feel free to visit) 👉🏻 : https://lgope-natours.onrender.com/
252
260
253
261
## Acknowledgement 🙏🏻
254
262
255
- * 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] ( https://www.udemy.com/course/nodejs-express-mongodb-bootcamp/ )
263
+ - 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] ( https://www.udemy.com/course/nodejs-express-mongodb-bootcamp/ )
0 commit comments