https://nanoleaf-challenge.herokuapp.com/
Disclaimer: the website is not responsive, so it's best to view it on a bigger screen instead of a mobile device.
Don't hesitate to email me at [email protected] if there's any problems or the Heroku site has crashed.
Nanoleaf's take-home assignment for the full stack developer internship.
This is a web-app which takes marketing data, sales data and product grids as JSON files, parses them, stores the data inside an SQL server and displays the results to the user, along with charts when appropriate.
npm install
to install all the dependencies required for the app- Edit the .env file and insert:
- DB_HOST="YOUR_DB_HOST"
- DB_USERNAME="YOUR_DB_USERNAME"
- DB_PASSWORD="YOUR_DB_PASS"
- DB_NAME="YOUR_DB_NAME"
- Run the
database_schema (USE THIS).sql
file on your DB schema. This will create all the required tables. node app.js
ornodemon app.js
to get the server started onlocalhost:5000
- Finally learned how to use and work with SQL! Will be using SQL for my next project, to extend my knowledge.
- Learned how to handle files uploaded by user.
- Learned how to create downloadable CSV files using data sent from the server.
- HTML using EJS as the templating engine
- CSS
- JavaScript(Node + Express) for the server and back-end
- Chart.js to graph data
- MySQL
- MySQL workbench for testing out the DB
- ClearDB - Database
- Heroku for hosting/serving the server
- If a product has multiple components, only the first one gets put into DB after the first time the data is uploaded.
- Server might crash if changes made quickly in products page.
- The JSON files given to me were not valid JSONs. I'm not sure if we were allowed to do this, but I edited each file and fixed it. Inside the
given_files
folder, there is a fixed and the original version of each JSON file (marketing data, sales data, products grid). The app takes in the fixed versions when the user clicks "Insert Original Data", but it also has checks for invalid JSON, and will alert the user if they try to upload invalid JSON files