Skip to content

πŸ“Ingress: an easy to use MVP on entry management, Ingress was built using Node.js and MongoDB database using mongoose, It uses ejs (embedded javascript templates), it also supports sending EMAILS and SMS using nodemailer module and Nexmo API respectively

License

Notifications You must be signed in to change notification settings

bymayanksingh/ingress-entry-management

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Open Issues Forks Stars Maintained Made with Node.js Open Source Love Built with Love Telegram/codemonk08

Table of Contents

About

Ingress is an easy-to-use MVP (Minimum Viable Product) for entry management. It was built using Node.js and MongoDB database with Mongoose ODM. The application uses EJS (Embedded JavaScript templates) for server-side rendering and supports sending emails and SMS notifications using the Nodemailer module and Nexmo API, respectively.

This project was implemented as a submission for the summergeeks 2020 internship challenge by Innovacer. It meets all the criteria mentioned in the assignment provided by summergeeks.

Features

  • User authentication (register, login, logout)
  • Host dashboard for managing visitors
  • Add new visitors
  • Check-in and check-out functionality
  • Email notifications to hosts upon visitor check-in
  • SMS notifications to hosts upon visitor check-in
  • Email notifications to visitors upon check-out
  • Responsive design using Tailwind CSS

Tech Stack

  • Backend: Node.js, Express.js
  • Database: MongoDB with Mongoose ODM
  • Frontend: EJS templates, Tailwind CSS
  • Authentication: Passport.js
  • Notifications: Nodemailer (Email), Nexmo API (SMS)

Installation

  1. Clone the repository:

    git clone https://github.com/code-monk08/entry-management.git
    cd entry-management
  2. Install dependencies:

    npm install
  3. Set up environment variables: Create a .env file in the root directory and add the following variables:

    PORT=5000
    SECRET=your_secret_key
    EMAIL=your_email@gmail.com
    PASSWORD=your_email_password
    NEXMOAPIKEY=your_nexmo_api_key
    NEXMOAPISECRET=your_nexmo_api_secret
    
  4. Start MongoDB:

    mongod
  5. Run the application:

    npm start

Usage

  1. Open your browser and navigate to http://localhost:5000
  2. Register as a new host or login if you already have an account
  3. Use the dashboard to add visitors and manage check-ins/check-outs

Project Structure

.
β”œβ”€β”€ app.js                 # Main application file
β”œβ”€β”€ config/                # Configuration files
β”‚   β”œβ”€β”€ auth.js            # Authentication middleware
β”‚   β”œβ”€β”€ keys.js            # Database configuration
β”‚   └── passport.js        # Passport.js configuration
β”œβ”€β”€ models/                # Database models
β”‚   β”œβ”€β”€ Host.js            # Host model
β”‚   └── Visitor.js         # Visitor model
β”œβ”€β”€ routes/                # Route handlers
β”‚   β”œβ”€β”€ hosts.js           # Host-related routes
β”‚   └── index.js           # Main routes
β”œβ”€β”€ views/                 # EJS templates
β”‚   β”œβ”€β”€ dashboard.ejs      # Dashboard view
β”‚   β”œβ”€β”€ layout.ejs         # Main layout
β”‚   β”œβ”€β”€ login.ejs          # Login view
β”‚   β”œβ”€β”€ register.ejs       # Registration view
β”‚   β”œβ”€β”€ welcome.ejs        # Welcome page
β”‚   └── partials/          # Partial views
β”‚       └── messages.ejs   # Flash messages partial
β”œβ”€β”€ public/                # Static files
β”‚   └── styles/            # CSS files
β”œβ”€β”€ .env                   # Environment variables
β”œβ”€β”€ package.json           # Project dependencies
└── README.md              # Project documentation

API Endpoints

  • GET /: Welcome page
  • GET /dashboard: Host dashboard (requires authentication)
  • POST /visitors: Add a new visitor
  • POST /visitor/:id/checkin: Check-in a visitor
  • POST /visitor/:id/checkout: Check-out a visitor
  • GET /hosts/login: Login page
  • GET /hosts/register: Registration page
  • POST /hosts/register: Register a new host
  • POST /hosts/login: Authenticate a host
  • POST /hosts/logout: Logout a host

Environment Variables

  • PORT: The port number on which the server will run
  • SECRET: Secret key for session management
  • EMAIL: Email address for sending notifications
  • PASSWORD: Password for the email account
  • NEXMOAPIKEY: Nexmo API key for SMS notifications
  • NEXMOAPISECRET: Nexmo API secret for SMS notifications

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a pull request

Please make sure to update tests as appropriate and adhere to the Code of Conduct.

License

This project is licensed under the MIT License - see the LICENSE file for details.


For any questions or support, please open an issue or contact the maintainer.

About

πŸ“Ingress: an easy to use MVP on entry management, Ingress was built using Node.js and MongoDB database using mongoose, It uses ejs (embedded javascript templates), it also supports sending EMAILS and SMS using nodemailer module and Nexmo API respectively

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published