Cover Image for Spincast

Spincast

Personal

Spincast

Spincast is a Zapier app which enables a user to connect Peloton to all of their favorite apps. I created Spincast while working on another personal project called LifeLog. I wanted to be able to track my health and fitness data holistically.

My main sources of exercise are cycling, going to gym and taking spin classes on the Peloton.Strava has an API so that covers cycling. Fitbit also has an API so that can cover the gym workouts. I still needed a way to read the workouts that I was doing on the Peloton.

While googling for Solutions I ran across this project which maintains unofficial API documentation for the Peloton API.

https://app.swaggerhub.com/apis/DovOps/peloton-unofficial-api/0.3.1

With that I decided to create a Zapier App which would receive Peloton workouts as triggers and allow me to use create a Zapier workflow to push the workout data into my LifeLog application.

Stack

Architecture

The biggest design challenge that I had is authenticating with the Peloton API. There is no delegated access to the Peloton API which means that a user will need to store their Peloton credentials in the Spincast backend. I did not want a user's credentials stored on a service that I managed, even encrypted, so I had to look for an alternative.

What I came up with is using AWS Systems Manager > Parameter store to persist the credentials. The backend would read them out to create a Peloton session only when required. Thus the Spincast backend would only ever “know” the credentials for the duration of the authentication process and they would never be stored on the server itself.

Registration DiagramgetWorkouts Diagram

Demo

Register for a Spincast account

Create a Zapier Integration

Connect your peloton account

Wait for some workouts to be loaded from Peloton. As workouts are created they will be sent to Zapier through the integration.

Spincast workouts grid