Case study · Hackathon · Jan 2022

Rest Day

A workout planner that schedules rest days, not just workouts. Built at DeltaHacks 8.

Role
Team of 2: Fitbit API integration, landing page, deploy
When
Jan 2022
Award
2nd place, “To Work or Not To Workout” sponsor challenge (AI Endurance), DeltaHacks 8
With
Willie Pai
Repo
JavaScript · ★ 1 · last push Feb 2022

01 The problem

Training plans schedule workouts, not recovery. Our idea: use sleep and activity data to decide when to train and when to rest.

02 What I built

Willie Pai and I built it in 36 hours at DeltaHacks 8 (Jan 2022). I took the data integration, the landing page and shipping it; Willie took the weekly schedule.

03 Highlights

  • Wrote the Fitbit Web API client, which pulls 7-day sleep and activity logs and heart-rate data (a standalone Node script, not yet wired into the UI).
  • Built the navigation bar and landing page with styled-components, plus the routes for the other pages.
  • Merged the feature branches, deployed the React app to GitHub Pages, and wrote the README and Devpost story.
  • Willie Pai built the weekly schedule view and the exercise GIFs.

04 Key decisions

  1. Data first, UI second

    The Fitbit client came first, as a standalone Node script, so we knew which data we could actually get before designing around it.

  2. Ship something demoable

    In 36 hours we deployed the React app with the schedule and landing page, and left wiring Fitbit data into the UI as the next step.

05 Architecture

  1. 01Fitbit Web APISleep, activity, heart rate
  2. 02Node clientStandalone script
  3. 03React appSchedule, today’s workout
  4. 04GitHub PagesDeployed

A React app on GitHub Pages; the Fitbit client ran on its own.

06 Stack

React
Fitbit Web API
7-day sleep and activity logs and heart-rate data.
styled-components
The navigation bar and landing page.
Node.js
Figma

07 Links & sources

The project’s links and the public sources this write-up draws on.

08 Also on GitHub

All repositories on GitHub →