---
title: "SimplyFPL: A Real-Time Fantasy Premier League Product, Built Solo"
description: "SimplyFPL shows Fantasy Premier League managers their live rank during matches. Every FPL request goes through a Cloudflare Worker, so traffic spikes hit the cache rather than the upstream API."
tags: ["Next.js 15", "TypeScript", "Tamagui", "Cloudflare Workers", "Durable Objects", "Cloudflare KV", "Supabase", "Stripe", "Turborepo", "Playwright"]
canonical: https://petewatters.ie/work/simplyfpl/
source: https://petewatters.ie/work/simplyfpl.md
---

# SimplyFPL: A Real-Time Fantasy Premier League Product, Built Solo

## Overview

Fantasy Premier League has around 11 million managers. During a gameweek they all want the same thing at the same time: their live rank. That is the moment of peak traffic, and the moment a tracker is most likely to slow down or fail.

SimplyFPL is my answer, built on my own: latest data first, nothing in the way, and an architecture designed for the Saturday 5pm spike.

![SimplyFPL live dashboard](/img/work/simplyfpl/before-web-dashboard.png)

## The problem

Three constraints at once:

- **Load arrives all at once.** Live data matters only during matches, when traffic peaks. If every browser polls FPL every 60 seconds, the upstream API rate-limits you exactly when users need it.
- **Dense data, little clutter.** Managers want a lot of numbers, fast. Every element has to earn its place.
- **A team's scope, one person.** Web now, native later, plus auth, payments, a price predictor and cohort analytics.

## What I built

### The architecture: a layered monorepo

A Turborepo and pnpm monorepo, organised in strict layers so the same logic can power web now and native later:

- **Domain logic** is pure TypeScript: the FPL client and the live-rank and price-change algorithms. No React, no platform code, unit-tested.
- **Application** is React-aware business logic and hooks.
- **Presentation** is one cross-platform component layer in Tamagui, and a thin Next.js shell that only composes and routes.
- **Infrastructure** is the Cloudflare Worker that fronts every FPL call.

Types carry no logic, UI carries no business logic, and apps depend on packages, never the reverse.

### Real-time data at the edge

SimplyFPL turns the polling model around:

- **Every** FPL request goes through a Cloudflare Worker with KV caching, never direct from the client. One upstream read serves many users.
- A **Durable Object** owns the live gameweek. It computes the live snapshot once and sends it over WebSockets to every connected client, with a polling fallback when sockets are not available.
- A **cohort engine** aggregates ownership and effective ownership by rank tier (top 1k, 10k, 100k and overall), so a manager can see what their rivals hold.
- A **price-change predictor** runs on the same edge infrastructure.

Load on the upstream API no longer grows with the number of users.

### The gameweek simulator

Live football only happens when it happens. You cannot test live-rank behaviour on a Tuesday in the off-season.

So I built a **gameweek simulator** into the worker. It replays a real gameweek's data through the live pipeline, deterministically. I can reproduce a specific minute of a specific gameweek to chase a bug, and run a full match day of state changes in seconds, in CI, with no live dependency.

A **season-archive** job captures the complete season before FPL wipes the previous year each August, so there is always real data to simulate against.

### Testing and delivery

- **BDD:** Gherkin specs with executable step definitions describe what users see. Every new feature ships with at least one scenario, and all network calls are mocked so no test touches live FPL.
- **End-to-end and visual regression:** Playwright drives real routes. After a styling regression took production down once, visual-regression and page-error checks became release gates. A blank screen now fails CI instead of reaching users.
- **Delivery:** GitFlow, conventional commits, pre-commit and pre-push hooks, and CI checks (format, lint, typecheck, tests, deploy) on every change. Work is planned as issues and short RFCs: live fan-out, the rivals view, the cohort engine and the simulator each had one.

## Designing it

The design system is information-first: a warm-neutral palette, monospace for every number, borders instead of shadows, and little motion. It is built once in Tamagui and shared across platforms.

I ran a design audit covering UX, hierarchy and WCAG AA contrast, then prototyped three redesign directions. The goal: make the live rank impossible to miss, and bring rank, key stats and the pitch together above the fold, on mobile too.

<figure>
  <img src="/img/work/simplyfpl/before-web-landing.png" alt="SimplyFPL home before the redesign" loading="lazy" />
  <figcaption>Before the redesign: functional, but the live rank is buried.</figcaption>
</figure>

<figure>
  <img src="/img/work/simplyfpl/after-C-web-dashboard.png" alt="Redesigned SimplyFPL dashboard, Vibrant Stadium direction" loading="lazy" />
  <figcaption>The "Vibrant Stadium" redesign direction: the live rank up top, club-coloured kits, and the whole picture above the fold.</figcaption>
</figure>

<figure>
  <img src="/img/work/simplyfpl/after-C-mobile-dashboard.png" alt="Redesigned SimplyFPL dashboard on mobile" loading="lazy" />
  <figcaption>The same direction on mobile: rank, stats and pitch in one view.</figcaption>
</figure>

## Where it is

SimplyFPL is live at [simplyfpl.com](https://simplyfpl.com). Next: the mobile app in Expo and a Pro tier.
