- Table of Contents
- About
- Features
- Tech Stack
- Installation
- Usage
- Project Structure
- API Endpoints
- Environment Variables
- Contributing
- License
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.
- 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
- Backend: Node.js, Express.js
- Database: MongoDB with Mongoose ODM
- Frontend: EJS templates, Tailwind CSS
- Authentication: Passport.js
- Notifications: Nodemailer (Email), Nexmo API (SMS)
-
Clone the repository:
git clone https://github.com/code-monk08/entry-management.git cd entry-management
-
Install dependencies:
npm install
-
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
-
Start MongoDB:
mongod
-
Run the application:
npm start
- Open your browser and navigate to
http://localhost:5000
- Register as a new host or login if you already have an account
- Use the dashboard to add visitors and manage check-ins/check-outs
.
βββ 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
GET /
: Welcome pageGET /dashboard
: Host dashboard (requires authentication)POST /visitors
: Add a new visitorPOST /visitor/:id/checkin
: Check-in a visitorPOST /visitor/:id/checkout
: Check-out a visitorGET /hosts/login
: Login pageGET /hosts/register
: Registration pagePOST /hosts/register
: Register a new hostPOST /hosts/login
: Authenticate a hostPOST /hosts/logout
: Logout a host
PORT
: The port number on which the server will runSECRET
: Secret key for session managementEMAIL
: Email address for sending notificationsPASSWORD
: Password for the email accountNEXMOAPIKEY
: Nexmo API key for SMS notificationsNEXMOAPISECRET
: Nexmo API secret for SMS notifications
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a pull request
Please make sure to update tests as appropriate and adhere to the Code of Conduct.
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.