Analyze coffee consumption behaviour and prefereces. The website is deployed to the cloud but the backend server is not.
Run the following commands in terminal:
Start React App
npm install
npm start
Start json-server Backend Server
npm run server
Then open http://localhost:3000 to view it in your local browser.
Click Save Log button on the website will create a REST API request to the backend server. The data will be saved in db.json JSON database.
Modify src/config.json can change the number of rows and number of buttons within a row dynamically.
instructionis the subtitlebuttonsdefined the button nameimagesdefines which images inassetsto use. Note there are only 7 images inassetsso use 0 - 6.- Please keep the number of
buttonsandimagesthe same. button_typedefined the type of the button. Please give unique name for each row.
For example:
"buttonType0" : {
"instruction" : "Choose a Coffee Type",
"button_type" : "coffeeType",
"buttons" : [
"Coffee",
"Expresso",
"Tea"
],
"images" : [
0,
1,
2
]
}