This project is about the design and development of Hotel Room Booking website.
- Color combination taken from MuffinGroupLink
$smalt-blue: #567d92;
$casper: #a9c5d3;
$pirate-gold: #b08902;
$teak: #b0a16b;
$candlelight: #fdd719;
$tuatara: #2b2a28;
$vis-vis: #ffec9f;
$vis-vis-2: #fcf2cc;
References
- https://youtube.com/playlist?list=PLOU2XLYxmsILkNW9d1Jw9rHLAEORuuS-9
- https://pay.google.com/business/console/?utm_source=yt-metadata&utm_medium=video&utm_campaign=integration
- https://developers.google.com/pay/api/web/overview
- https://developers.google.com/pay/api/web/reference/client
- Demos
- MongoDB
- MulterLink
npm install --save multer
- Multer GridFS StorageLink
npm install --save multer-gridfs-storage
- Store flash messages in sessionLink
npm install connect-flash
- Creates a session and stores session data at server-side, be it a database storage or default session storage
MemoryStore
(not preferred)Link
npm install express-session
- Create a mongo storage to store express sessionLink
npm install connect-mongo
- https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/
- https://www.mongodb.com/docs/database-tools/
- Frequent HTTP Status Codes usedLink
- https://stackoverflow.com/questions/13335881/redirecting-to-previous-page-after-authentication-in-node-js-using-passport-js
- Avoid creating sessions on page reload
- Allow dynamic booking, that
- booking in advance.
- if already booked, then look for the other dates for that particular room.
- room - addOns
- add to cart functionality
- Navigation
- Navigation responsive
- Booking
- Show bookings
- Checkout panel
- If room booked but payment not done, then the guest will see the "Go to checkout"(checkout panel) in room page as well as the guest can also edit the date input until the payment has been done.
- Prevent others to see the checkout panel, if the guest has already booked the room.
- Finish payment processing in backend
To start this application, you need to configure following things
- Create OAuth2.0 client credentials on Google Cloud Console
- Environment variables
- Install the dependencies
- Install MongoDB compass and complete the setup using MongoDB database tools
- Create a database
The following are the keys against which the values has to be put
DB_URL=<mongodb://127.0.0.1:27017/DATABASE_NAME>
CLIENT_ID=<OAUTH2.0_CLIENT_ID>
CLIENT_SECRET=<OAUTH2.0_CLIENT_SECRET>
CLIENT_REDIRECT=/auth/redirect/google
CLIENT_SUCCESS=/
SERVER_URL=https://<DOMAIN>
Install the dependencies using the following npm command
npm install
Install the server
- https://www.mongodb.com/try/download/compass
- https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/
Install database tools
After all configurations have been completed, run the following command in the terminal making sure you're in root directory
npm start