/innovaccer-summergeeks-20

Assignment for Innovaccer's SummerGeeks 2020 - SDE (Applications)

Primary LanguageHTML

Assignment for SDE - Intern (Applications)

Installation

  1. Clone the repository using git clone and then change the directory to root of the project
git clone https://github.com/gkalyan04/innovaccer-summergeeks-20.git
cd innovaccer-summergeeks-20
  1. Use npm or yarn to install dependencies for the project
yarn

OR

npm install
  1. Make sure, MongoDB is running. If not installed, then install from here.

  2. Setup NodeMailer and Twilio SMS Api configuration. Just go to routes.js , then simply enter your configuration.

  3. Run the program either by npm or yarn using

yarn start

OR

npm start

The console logs the following if the app is running properly

Connected to database at: mongodb://localhost:27017/database
  1. Navigate to http://localhost:5000

Project Folder Structure

Note: The folder tree does not include sub-directories for common/generated folders. For example - node_modules.

─── innovaccer-summergeeks-20
    ├── public
    │   └── style.css
    ├── views
    │   └── partials
    │       └── nav.ejs
    │   └── checkin.ejs
    │   └── checkout.ejs
    │   └── error.ejs
    │   └── host.ejs
    │   └── success.ejs
    ├── app.js
    ├── routes.js
    └── package.json
    
    

Watch the video

Approach

Event Management Service is based on an idea which stores data of a visitor and host in the database and as the data is saved timestamp is also stored as well. SMS and E-mail is sent to the host consisting the details of visitor. When a session is ended, the timestamp is also stored and then mail is send to the visitor via node-mailer and sms via twilio. Once a session has ended user is not allowed to change the timestamp.

Database 'user' and it's Collections are designed as following:

  • Visitor: Contains details specific to the visitors.
─── visitor
    ├── name
    ├── email
    ├── phone
    ├── check_in_time
    └── check_out_time
  • Hosts: Contains details specific to the hosts.
─── host
    ├── name
    ├── email
    └── phone

Technology Stack

Screenshots

  • Check-in Portal Check-in Portal

  • Check-out Portal Check-out Portal

  • SMS & Email sent to Host when new visitor checks in. SMS-host

  • SMS & Email sent to Visitor once he/she check out. SMS-visitor

  • Database database