An application to help you control the water quantity you drink a day, created using MongoDB Stitch and React.js. If you want to know more about this necessity: Drink 8 Glasses of Water a Day: Fact or Fiction?.
React.js application created using Create React App.
This SPA show a glass of water. Everytime you add another cup, the glass of water fullfills a little more. When you complete your 8 glasses goal, the glass will be full.
You also can see a history with the last seven days and if you accomplished or not your goals each day.
Exported Stitch app with 2 endpoints.
https://webhooks.mongodb-stitch.com/api/client/v2.0/app/watercupcounter-alfxg/service/watercup/incoming_webhook/add?appId={appId}
Here you can POST how many cups you want to add in the day by sending the following body:
{
"cups": Number
}
https://webhooks.mongodb-stitch.com/api/client/v2.0/app/watercupcounter-alfxg/service/watercup/incoming_webhook/history?appId={appId}
Here you can GET how many cups you have drunk in the last seven days, including today. The response will look like:
[
{
"date": {
"$date": {
"$numberLong": String
}
},
"cups": {
"$numberInt": String
}
}
]