Skip to content

ra101/Entry-Management-Software

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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