- This Web App is made for the purpose of innovacer summergeeks-SDE. Link deployed on heroku here.
- Tech stack used : Material Bootsrap, NodeJS, MongoDB, ExpressJS, Nodemailer for emails and way2sms for Mobile Messages,
- Assigment Details here.
- Server is deployed on Heroku and Database on MongoDb Atlas
-
Check-in and Check-out options for Visitor
-
Host can register itself with name, mail, phone no. and address.
-
For Check-in, visitor need to provided : name, email, phone , host name and host email id.
-
Visitor information is saved into the database with checkin timestamp.
-
After visitor check-in, a mail and a SMS is sent to the host.
-
On leaving the place, visitor do check-out. Details to be provided are name and phone no. only.
-
As soon as visitor check-out, an email is sent to his email id with all his details.
-
List of Hosts is also available.
-
Modular approach for coding. Features like Database, Email and SMS are placed separate modules and can be executed independently.
-
Code is easy to understand without any complexity.
Before proceeding please download and install NodeJS and MongoDB because it is required.
-
Download/Clone the Repository
-
Navigate into the Repository folder on your disk using Terminal
-
Make sure that you have the Node and MongoDB installed
-
Run the following command to run the setup,
npm install
-
Create .env file for environment setup
EMAIL = gmail-id
PASSWORD = gmail_password
SMSAPIKEY = way2sms API key
SMSSECRET = way2sms Secret key
MONGO_URL = MongoDB Atlas connection link
Now everything required should be installed, go ahead and run the following command whenever you want to run the app,
node index.js
Route | Description | Signature |
---|---|---|
/CheckIn | (post) Search for Host name and then creates a new Visitor Entry in MongoDB | Body: { Name , Phone , Email , Address , hostname , hostemail , CheckInTime } |
/CheckOut | (post) Update the Checkout time of Visitor in MongoDB | Body: { Name , Email } |
/AddHost | (post) Add new Host Entry in MongoDB | Body: { Name , Phone , Email , Address } |
/HostList | (get) Get array of host list form MongoDB | |
/sendemail | (post) Send email using nodemailer modular | Body: { tosend , message } |
/sendsms | (post) Send sms using way2sms | Body: { tosend , message } |