Have you ever been confused on how to check in? Are you using a combination of google forms and a spreadsheet and doing it manually? There IS a better way! This node web app is built to help you register AUTOMATICALLY!
brew update
brew install node
cinst nodejs.install
sudo apt-get install nodejs
sudo apt-get install npm
git clone https://github.com/Hacker719/RegHack
This is important because the entire program will make and store data based on this. So to do this you need to go to the config.js file. Then you will face the defualt options. You need to include all parts of data you want to record (ex. School, Age, Height etc.) You need to input those, and an example input (to determine between string and integer). There are some special configurations:
checked
. This will allow you to, see if they are checked in or
out and use the QR reader function. To activate set it to false.email
. This will allow you to, mass email the people an html
email. To activate set it to a stringAn example config.js is:
module.exports = {
"Name":"John Doe",
"School":"Berkely College",
"Grade":12,
"age":42,
"email":"joe@gmail.com",
"checked":false
}
To configure the .env file you can check a model one at model.env. The basic parts include:
An example is:
MONGO_URL=mongodb+srv://username:password@reghacktest-oeoxh.gcp.mongodb.net/registrationsystem
EMAIL_USER=reghack@gmail.com
EMAIL_PASS=password01
API_KEY=rEgHaks2201
To start up the app locally, go to the folder, and type:
npm install
node index.js
Then the app should be running on localhost:3000
This will give a GUI where you can use the POST /addperson
function in a
form.
This will give a GUI where you can use the POST /sendmail
function in a
website.
This will give a GUI where you can view all the people and what they are in a table. This
also allows the user to use the /clear
POST in a GUI.
This will give a GUI where you can use the POST /checkin
function in a
website. It scans the QR code to check people in. This QR code can be generated from _id
or from the mass email (()b64code()
).
/addperson
This is to add a person to the database. You need to include your API key and the parts in your config. You do not include checked. An example for a config above is
{
"Name":"John Doe",
"age":42,
"School":"Stanford",
"Grade": 13,
"email":"crackerjack@yopmail.com",
"key":"your chosen API key"
}
/checkin
This is to change a person's checked value. This lets you know if they are checked "in" or "out". An example one would be:
{
"id":"John's _id in MongoDB",
"where":"in",
"key":"your chosen API key"
}
/sendmail
This is to send a mail to the group. ()b64code()
will be replaced with a
base 64 url of a QR code that you can scan with the /reader GUI. You can also use
()anyconfigvalue()
for that to be displayed. AN example includes:
{
"subject":"Hello I am a subject",
"html":"<p> Hello ()Name() I know your email-()email and school-()School() </p> <img src='()b64code()'>",
"key":"your chosen API key"
}
/clear
This checked for the key, then clears the entire MongoDB collection, deleteing all data. THIS IS PERMANENT AND DANGEROUS. And example is:
{
"key":"your chosen API key"
}
Contributers