Code Monkey home page Code Monkey logo

habitlogger's Introduction

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

Jest Setup

  • Guide to Test Driven Development:
    • Create a test folder (__tests__) on the same path level as your component
    • One file per component
    • Follow the Red -> Green -> Refactor workflow
    • Run your test in watch mode to get the real-time update
    • Enjoy TDD 😂

habitlogger's People

Contributors

dwrz avatar jtang17 avatar cpbennett4 avatar bobdaball avatar elgeesound avatar awiw642 avatar v1rtuouscycle avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.