-
11Securing mySQL
But wait, before you go on, it's important for you to understand that security is paramount in these kinds of applications. Though we do our best on our end to secure your device so hackers (and greedy marketers) can't snoop in to customer information, you also have a responsibility to share.
Though we can't teach everything on server security and database management in this tutorial, we can start by first securing your password for mySQL. To do that, start by entering the following command:
sudo mysql_secure_installation
You will then be asked to set a password for the 'root' user. Make sure to enter a SECURE password for this one, preferably a different password from what you set for PHPMYADMIN (Step 8).
Answer 'Y' for the next few prompts you'll see for a secure installation.
Your mySQL is now configured more securely.
-
12Run the Device
Now for the moment of truth!
To start running the server, enter the following commands:
cd ~/server/registro-raspi-server npm start
It should show a message that it's listening to port 3000. That means the server is running!
To open the webpage simply open your browser(the globe icon), and enter localhost. You should see a screen that looks like the following:
-
13Generate and Handle Keys
If you're planning to implement a system of your own (which is probably why you're here in the first place) you will need to generate an RSA key-pair. RSA is basically an encryption method that involves two keys. A public key used to encrypt data, and a private key used to decrypt. You can learn more in this comprehensive introductory video.
To start using the system, you have to first navigate into the admin page (click on the admin link when you get to visit the page). Then go to the bottom and click the shiny golden button 'Generate Keys'.
Copy the 'private.pem' file to a secure location. Only the people who should be able to decrypt the data should have access to this file!
This is the file key you will use when you want to download the decrypted data later on.
It's good practice to not place the file in the same device. You can insert a USB flashdrive into the Raspberry Pi if you wish. Copying is the same as you would on a normal desktop computer. Afterwards, it would be smart to delete the file on the Raspberry Pi. Be careful though. If you lose this key you won't be able to decrypt the data your customers generate! If that happens, you'll have to generate a new key pair!
-
14Testing
At this point, the system should work as intended. To test whether or not the system works, we invite you to make a sample QR code via our web app. You can access it here.
Click continue and the plus icon to get started with registration. This will generate a QR code for you. Don't worry. The data is only and already saved in your phone. You wouldn't need to fill it up again even if you access the webpage later or go offline!
Next up, connect your barcode scanner and scan away!
-
15Conclusion
At this point, you would have made your own STARTEC REGISTRO KIOSK! Ask your customers or clients to generate codes using the webpage we provided, and before they enter the establishment, ask them to present it to you.
They can even installed the app on their phone for full offline access! Clicking on Install App instead of continue will tell you how to do just that.
That would be all. Thank you so much for going through this tutorial with us. We sincerely hope you can benefit from the system we made for you. We will continue to upgrade and update to refine our system to suit your needs.
This system is open-source, meaning all of the code is free to use. If you have experience with web development, you can even develop the code further to suit your own needs.
© 2020 | Startec Innovations
Note this software is covered by the MIT License
-
16Extras
Every time you reboot the device, you'll need to do step 12, but only step 12.
We will be updating this instruction set in the future to include how to run the program at startup.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.