Giter Site home page Giter Site logo

ra101 / entry-management-software Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 1.0 1.68 MB

An entry management application built using electron(node.js) and firebase [also nodemailer and nexmo]

License: MIT License

JavaScript 38.61% CSS 22.37% HTML 39.02%
electron electron-app electronjs electron-application node nodejs node-js nodemailer nexmo nexmo-ap nexmo-sms nodemailer-transport summergeeks electron-rebuild electron-reload dotenv firebase firebase-database entry-management-system javascript

entry-management-software's Introduction

Made with Electron Issues Forks Stars Maintained Open Source Telegram

πŸ–₯️ Download

Release

To make the above installation working Goto dotenv

πŸ—‚οΈ Index

πŸ’Ό About

It is an Entry Management Cross-Platform Software built using Electron (a Node.js framework) and Firebase (for database), This app includes Email (Nodemailer Module) and SMS (Nexmo API) automation.

πŸ“’ Database

There are 2 collections: Host and Visits, which have entries as given below...

πŸ“ˆ Workflow

There are 2 categories Host and Visitor and 2 Constraint that Each Host can be visited by only one visitor and host can cannot leave until visitor leaves.

Host collection in database has an entry called "Session" which can take either true, false or "invalid"

So, initially there are 4 button:

  • Add Host (always active)
  • Remove Host (active iff any of host.session is found 'false')
  • Check-In (active iff any of host.session is found 'false')
  • Check-Out (active iff any of host.session is found 'true')

βž• Add Host

A form that stores Name,Email, Phone No and Address(abc) given by host ontu firebase, along with these entries, Time-in, time-out and session are also added where, time-in is timestamp of form submition, time-out is default to -1 and session is set to false.

βž– Remove Host

Select the host to be removed, and click the button, all this button does is add update time-out of host to current timestamp and set session to "invalid". (that means host no longer available).

This makes Data remain in database and yet not included in visiting process

⬆️ Check-In

Dropdown box appends all hosts with session===false.

A form that stores Name,Email, Phone No and Host ID(abc) given by visitor ontu firebase, along with these entries, Time-in and time-out are also added where, time-in is timestamp of form submition and time-out is default to -1.

It also update the Host(ID).session to 'true'. (making host accupied)

After this Email and a SMS is sent to Host using selected ID, stating the details of visitor.

⬇️ Check-Out

Dropdown box appends all visitors with time-out===-1.

Select the visitor to check out, and click the button, all this button does is update time-out of visitor to current timestamp and set session of host id it is associated with, to false. (that means host is no longer accupied).

After this Email and a SMS is sent to Visitor, stating the details of zer visit.

βš™οΈ Development

πŸ’Ύ Installation

If you just want to do a simple test run of the application, you can first

  • Clone the repository
$ git clone https://github.com/ra101/Entry-Management-Software.git
  • Install dependencies by using the following commands.
$ cd Entry-Management-Software
$ sudo npm install
  • Obtain API Key & API Secret from Nexmo

  • Create an app in Firebase and obtain its Credentials from Firebase

dotenv
  • Create a .env file in root directory and assign the following environment variables NOTE: don't version control your .env file, make sure .env is added in .gitignore file
$ touch .env #assuming you are in root directory of app
$ echo "EMAIL=<Your/Admin's Email Id>" >> .env
$ echo "PASS=<Your/Admin's Email Password>" >> .env
$ echo "FBKEY=<Firebase Key>" >> .env
$ echo "AUTHDOMAIN=<Firebase Authdomain>" >> .env
$ echo "DATABASEURL=<Firebase databaseURL>" >> .env
$ echo "PROJECTID=<Firebase ProjectID>" >> .env
$ echo "STORAGEBUCKET=<Firebase Storage Bucket>" >> .env
$ echo "MESSAGINGSENDERID=<Firebase Messaging SenderID>" >> .env
$ echo "APPID=<Firebase AppID>" >> .env
$ echo "NXKEY=<Nexmo API key>" >> .env
$ echo "NXSECRET=<Nexmo API Secret>" >> .env
  • Firestore uses gRPC. This works in all types of Electron envs but you may see this error at first: β€œFailed to load gRPC binary module because it was not installed for the current system” . there is devDependencies to resolve that i.e. electron-rebuild, more on that in this Article.
$ npm install --save-dev electron-rebuild

Then, whenever you install a new npm package, rerun electron-rebuild:

$ npm run rebuild
  • Finally run the application using
$ node start

πŸ“¦ Build

Install electron-builder as devDep and run dist:

$ npm install --save-dev electron-builder
$ npm run dist

This will Create a "dist" named folder containing unpacked (folder with multiple files) and Installer (executable). These will show an error, as there is no .env file. To resolve this add .env in installed folder (in case of Installer) or .env directly to uppacked folder

πŸ“‚ File Structure

  • Add a file structure here with the basic details about files, below is an example.
.Entry-Management-Software
β”œβ”€β”€ .gitignore
β”œβ”€β”€ add.html
β”œβ”€β”€ app.html
|
β”œβ”€β”€β”€images
β”‚   β”œβ”€β”€ host.png
β”‚   └── visitor.png
|
β”œβ”€β”€ in.html
β”œβ”€β”€ index.js
β”œβ”€β”€ LICENSE
β”œβ”€β”€ min.html
β”œβ”€β”€ out.html
β”œβ”€β”€ package-lock.json
β”œβ”€β”€ package.json
β”œβ”€β”€ README.md
β”‚
β”œβ”€β”€β”€scripts
β”‚   β”œβ”€β”€ app.js
β”‚   β”œβ”€β”€ display.js
β”‚   β”œβ”€β”€ form.js
β”‚   └── messaging.js
β”‚
└───stylesheet
    β”œβ”€β”€ app.css
    └── form.css

3 directories, 19 files

🌟 Credit/Acknowledgment

Contributors

πŸ“œ License

License

entry-management-software's People

Contributors

ra101 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

rajat353

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.