This system is build using Express.js as back end and React.js as front end.
All interaction between back end and front end is done via API calls.
Link to this readme.md file on github
This project was done as part of a school assignment, it is in not secure or robust enough to use in any production enviourment, please only use this for learning.
- yarn
- NodeJS
- MySQL or MariaDB database with at least one existing user
There needs to be a database named
users
To generate the tables run the userschema.sql from the config folder in the users database Example SQL query to insert the one required user:
INSERT INTO atmUsers (UserID, CreatedAt, Address, SSN, fName, lName) VALUES (0,"1991-03-25 10:11:12","Pilestredet 52", 110391387, "Anna", "Sethnes");From root folder run yarn
From client folder run yarn
Client and back end can run independantly and will both function on their own, how ever front end would get no data from the back end. It is a good idea to run both front end and back end at the same time, this can be done manually by running client and back end or use the included concurrency script in this project. To run the entire project, from root of this project in terminal run
yarn dev, see package.json in project root folder for more scripts.
All registered PINs for usercard are encrypted with a hash and 15 salt rounds. Data is not encrypted in transit by default in this application. The application works with HTTPS, some data is stored as normal session variables in cleartext. Implementation of further security using JWS and Passport.js had to be halted due to project timeline limitation. As previously stated this system is not secure or robust enought for any production system
If getting "Node.JS: Getting error : [nodemon] Internal watch failed: watch ENOSPC" in Linux (possibly MacOS but not tested) run
echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p from the terminal. See this StackOverflow post for more information.