Coder Social home page Coder Social logo

goals-react-frontend's Introduction

GOALS frontend

Frontend for Goals app.

JavaScript / React / Material UI

This project was bootstrapped with Create React App.

Note: This app is not functional without the GOALS API. This can be found here.

Available Scripts

npm start

Runs the app in the development mode on http://localhost:3000.

npm test

Launches the test runner in the interactive watch mode.

Component Hierarchy


How does the app work?

The main functionality of the app lies in the Goalpage, an interactive dashboard to track a specific user goal.

One rep max (ORM or 1RM) is used to track user progress. ORM is a scalable measure of strength in a specific category, where a weight and reps combination can be reduced to a single number of the maximum weight that can be moved in a single repetition. In this app, ORM is calculated using the Brzycki formula.

When a user creates a goal, they enter in a ORM target and a timeline in which they want to reach that target (3, 6, 9, or 12 months). That timeline starts on creation of the goal.

An important detail for calculating the bar and progress charts(right side of the dashboard) is the start weight. Start weight is set on the first recorded workout:

const firstRecord = startingProgress.date === 0;

      if (firstRecord) {
        setStartingProgress({
          date: formData.date,
          orm: formData.orm,
        });
      }

This startingProgress is then used as the base for the percentage calculations used on the bar chart and progress bar. Example:

  • Goal set as 200 lbs
  • First workout is 100 lbs with 1 rep (100 ORM)
    • The baseline is now set as a scale from 100 - 200
  • Second workout is 120 lbs with 1 rep (120 ORM)
    • % completed bar and progress line are now at 20%
  • The blue time-passed bar is a percentage of time elapsed from the start date to the latest recorded workout

goals-react-frontend's People

Contributors

cwayr avatar

Stargazers

Instructor Melissa @Coding Dojo avatar  avatar

Watchers

 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.