Skip to content

Latest commit

 

History

History
78 lines (72 loc) · 3.36 KB

README.org

File metadata and controls

78 lines (72 loc) · 3.36 KB

Stone and Sand

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

  • Tech Stack:
    • MongoDB
    • Express
    • React
    • Node
  • Additional technologies:
    • Axios
    • Chart.js
    • Mongoose
    • Webpack

Server Endpoints

REQUEST

METHODURLREQUEST.BODYEXAMPLE
GET/
POST/signupJSON{username: ‘Stone’, password:’sandstone’}
POST/loginJSON{username: ‘Stone’, password:’sandstone’}
GET/username
GET/api/username/habit
POST/api/username/habitJSON{habit:’smoking’, limit:’5’, unit:’cigars’, username:’Stone’,
timeframe: ‘week’}
POST/api/username/logJSON{habit:’running’, unit:’1’, timestamp: ‘2017-11-28T00:23:28.341Z’}

RESPONSE

METHODURLSUCCESS TYPESUCCESS CONTENTFAIL TYPEFAIL CONTENT
GET/index.html
POST/signupstringusernamenullnull
POST/loginstringusernamenullnull
GET/usernamearrayhabit listarrayempty
GET/api/username/habitobjecthabit datanullnull
POST/api/username/habitarrayupdated habit listarrayempty
POST/api/username/logobjectoccurrencenullnull

Directory Structure

  • client/
    • public/
      • bundle.js
      • index.html
      • style.css
    • src/
      • Auth
        • Auth.jsx
      • 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/
    • index.js
  • webpack.config.js