if you're not first, you're last
This site was created solely to settle this feud.
After getting a Peloton, my "friend" Pat would systematically one-up me on every ride I took.
I figured a website to help track this would be a good addition to my list of marginally useful/useless tools.
faq
q: Why can't I find/add myself?
Peloton doesn't have an official api so to make sure I don't slam their servers with requests, rickybobby is currently in a pseudo-invite-only mode.
You can have your account tracked if someone already on rickybobby is following you (on Peloton).
You can also add yourself to the waitlist and we will add new users gradually.
If you really want to be added asap, reach out and we'll see what we can do.
I plan on open sourcing rickybobby at some point, so you can eventually run it yourself!
All you'll need is some terminal/Linux knowledge and a $5/mo DigitalOcean box and you'll be able to run rickybobby for yourself and your friends.
q: Can you add ___?
Maybe - send an email to rickybobby @ goosecode dot com, or ping me some other way.
q: What is ricky bobby?
A pretty funny movie
The main quote is "if you're not first, you're last", which is very fitting.
roadmap
- Workout performance graph comparisons
- Individual Workout Comparison page + share link
- "Shake and Bake" score that takes into account first taken, attempts, streaks, etc
- Global "ELO" score with considerations around fair user to user comparisons
software
As with many of my new, marginally useful, projects - I took rickybobby as an opportunity to not only scratch an itch,
but to better explore a programming language and play around with some ideas I've read about or seen.
As a SQLite superfan, the Baked Data Architecture is something I've unknowingly used in the past and wanted to dig a little deeper into with in this project.
I was hoping to find an elegant way to handle write routing to a single node while maintaining the
isolated/distributed read properties but haven't landed on the right implementation just yet.
On the language front, while I've dabbled with Javascript (mostly on the frontend), this was my first major dive into the Javascript/Node ecosystem.
The project is broken out into four main segments:
- (Peloton) API - interface to the Peloton API which sources all the data
- The API layer is built on top of node-fetch
- Database - interface to SQLite3 database that locally stores and structures the API data
- The SQLite3 database layer is built on top of better-sqlite3
- "Glue" - interface that bridges API and Database to provide a consistent, formatted dataset
- Web - layer to present the rickybobby frontend + data
- The web layer is mainly NodeJS/Express
- Pages are templated using plain EJS
The scraper runs multiple times a day, fetching updates for all the users that are currently "active".
The raw data is pulled into the SQLite data, then used to build the formatted "view" tables.
A light, homebrew, ORM allows for data access and the common interface from all components into the SQLite database.
Finally, the ExpressJS web frontend handles routing and rendering of the specific pages.