Daily life event tracker with data visualization. On the client side, ‘event’ references ‘habit’.
To run the app, install dependencies with npm install. Run these scripts: ‘npm run react-dev’, ‘npm run server-dev’, ‘npm run db/seed.js’, then open the app at localhost:3000.
- Tech Stack:
- MongoDB
- Express
- React
- Node
- Additional technologies:
- Axios
- Chart.js
- Mongoose
- Webpack
METHOD | URL | REQUEST.BODY | EXAMPLE |
GET | / | | |
POST | /signup | JSON | {username: ‘Stone’, password:’sandstone’} |
POST | /login | JSON | {username: ‘Stone’, password:’sandstone’} |
GET | /username | | |
GET | /api/username/habit | | |
POST | /api/username/habit | JSON | {habit:’smoking’, limit:’5’, unit:’cigars’, username:’Stone’, |
| | | timeframe: ‘week’} |
POST | /api/username/log | JSON | {habit:’running’, unit:’1’, timestamp: ‘2017-11-28T00:23:28.341Z’} |
METHOD | URL | SUCCESS TYPE | SUCCESS CONTENT | FAIL TYPE | FAIL CONTENT |
GET | / | index.html | | | |
POST | /signup | string | username | null | null |
POST | /login | string | username | null | null |
GET | /username | array | habit list | array | empty |
GET | /api/username/habit | object | habit data | null | null |
POST | /api/username/habit | array | updated habit list | array | empty |
POST | /api/username/log | object | occurrence | null | null |
- client/
- public/
- bundle.js
- index.html
- style.css
- src/
- Auth
- Chart.jsx
- DataLogger.jsx
- EventCreator.jsx
- EventSelector.jsx
- index.jsx
- Login.jsx
- Table.jsx
- TopBar.jsx
- CONTRIBUTING.org
- db/
- data/
- index.js
- schemas.js
- seed.js
- .eslintrc
- .gitignore
- node_modules/
- package.json
- package-lock.json
- README.org
- server/
- webpack.config.js