/EntryManager-Task

A simple web app for managing Entry of visitors

Primary LanguageTypeScriptMIT LicenseMIT

EntryManager

This project was generated with Angular CLI version 7.1.2.

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

EntryManager

A simple web app for managing Entry of visitors

API

  1. Register user (POST)
> http://localhost:4000/users/register 
  Request body
 { 
  "name":"test5",
  "email":"test5@test.com",
  "password":"password",
  "username":"test5"
  }
  1. Login User (POST)
> http://localhost:4000/users/authenticate
  Request body 
  { 
  "password":"password",
  "username":"test5"
  }
  1. Check In submit (POST)
> http://localhost:4000/check/in/submit
  Request body 
  {
	"vistorPhone": "9123456789",
  "vistorCheckIn": "9:30"
  }
  1. Check Out Submit (POST)
> http://localhost:4000/check/out/submit
  Request body 
  {
    "checkout": "9:30"
  }

Usage

  1. Add .env file in the root directory and add the following:
  mongoUri = '<YOUR_MONGODB_URL>'
  secret = 'helloworld'
  sendgridUsername = "<YOUR_SENDGRID_URL>"
  sendgridPassword = "<YOUR_SENDGRID_PASSWORD>"
  mailService = "SendGrid"
  PORT = 4000
  1. Install dependencies
   npm install
  1. To run backend (only)
   npm run server
  1. To run the app (both client and server at a time)
   npm run app
  1. Open your browser and move to http://localhost:4000 (You are good to go!)

Project Structure

1. Backend files: /server
2. Client Side: /src

Running application:

1. Home page

home

2. Login Page

login

3. Register page

register

4. Check In

checkIn

5. Check Out

checkout

6. Email sent

Made with ❤️ by Rupeshiya