Case study · 2025 – 2026
INNER: an end-to-end sports-tech platform
How a team of two designed and shipped a complete product: a web platform for four user roles, a shop with payments and shipping, race data, mobile apps and the plan running on the watch.
- Role
- Co-founder & CTO
- Period
- Jul 2025 – present
- Team
- Two co-founders; domain rules come from FANTÉ's expert team
- Stack
- React 19, Firebase, Node.js 22, Python, Monkey C
- Status
- In production
- registered users
- 1,200+
- platforms in production
- 5
- user roles
- 4
- Cloud Functions
- 52
- test files in 8 months
- 6 → 316
- mobile bundle size
- −81%
01
Product and context
An endurance athlete needs to know what to take, and when, across hours of effort. INNER builds that plan from the athlete's profile and the race, delivers it to the phone and the watch, and sells and ships the products in it.
The nutrition rules are defined by FANTÉ's expert team. My job is to turn them into reliable software and ship the whole product under these constraints:
- Five surfaces and a team of two.
- Payments and personal data that tolerate neither errors nor duplicates.
- Watches with roughly 128 KB of memory available to a Data Field.
What it includes
- Race planner
- Roles: athlete, nutritionist, organiser and admin
- Shop, payments and shipping
- Race finder
- Back office: orders, stock, discounts and points
- Event kiosk mode
- iOS and Android apps
- Garmin Data Field and watch app
02
Architecture
A single serverless backend serves the web platform, the mobile apps and the watches.
Clients
- Web · React 19
- iOS & Android · Median
- Garmin Data Field · Monkey C
- Garmin Watch App · Monkey C
Backend · Firebase
- Auth · Sign in with Apple
- Firestore · ~49 collections
- 52 Cloud Functions · Node 22
- Hosting · CI/CD
Integrations
- Redsys · payments
- Sendcloud · shipping
- Brevo / SendGrid · email
- OneSignal · push
- Sentry · GA4
- 30 callable functions, 11 HTTP endpoints and 11 Firestore triggers.
- europe-west1 region, co-located with Firestore in eur3.
03
Web platform and roles
A single React 19 app serves four roles: athletes plan their races, nutritionists follow their athletes, organisers manage their events and admins run orders, stock, discounts and points from an in-house back office. A kiosk mode lets people create plans at live events.
- 73 routes, including 12 for admins and 7 for nutritionists.
- Spanish and English with full parity: 25 translation namespaces per language.
- Per-role Firestore rules, with the role immutable from the client.
- Offline Firestore cache, Consent Mode and self-service account deletion.
04
Planning engine
The engine turns domain rule tables into a plan on a 15-minute grid, with a per-interval budget and per-slot limits — for example, at most two products per slot.
Rules live in data tables, separate from the distribution algorithm. Decisions are deterministic and covered by about 180 regression tests organised by scenario: half marathon, marathon, ultra, high load and solid food.
05
Shop, payments and shipping
The server is the only authority: it prices the order from a catalogue generated from a single source — with a drift check in CI —, applies the discount rules and never trusts the client.
- 1Server-side quote
- 2Payment session
- 3Redsys (POS)
- 4Signed notification
- 53DES + HMAC-SHA256 check
- 6Transactional lease lock · 5 min TTL
- 78 checkpointed steps
- 8Lock release
Order · promotion · record · history · points · discount · stock · shipping
If the bank or the client retries, only the pending steps run. Shipping goes through Sendcloud with an HMAC-verified webhook, and email fails over between Brevo and SendGrid.
06
Race data
The race finder is fed by an in-house Python pipeline deployed on Cloud Functions gen2 and scheduled with Cloud Scheduler. The functions are not public: only the scheduler's service account can invoke them.
- 5 sources and 6 scheduled jobs.
- Idempotent fingerprint upserts: a repeated race is never duplicated.
- An HTTP client that honours robots.txt, and cached geocoding.
- About 288 upcoming races indexed; the user's location is used on the fly and never stored.
07
Mobile apps and launch
- On the App Store and Google Play since 5 October 2026, with Sign in with Apple, push (OneSignal), deep links and self-service account deletion.
- Three App Review rejections resolved (guidelines 2.1, 2.1(a) and 1.4.1), including an endless loading state after Sign in with Apple.
- Bundle cut from 51.3 to 9.5 MB (−81%), offline Firestore cache and deferred Sentry: 0 KB on initial load.
- Functions migrated from us-central1 to europe-west1 with zero downtime, running in both regions in the meantime and guarded in CI.

08
From plan to wrist
The watch has no user account: it pairs with a code and downloads the plan from an HTTP function with conditional caching (ETag/304). Because Connect IQ does not expose response headers, the ETag also travels in the body.
The Data Field runs inside the native activity with roughly 128 KB of memory: a custom JSON parser that tolerates truncated responses, dual persistence and vibration alerts even when the field is not on screen. To validate 109 watches I built a QA harness that compiles the manifest's 93 products and runs the tests across 7 simulators.
- WebThe athlete generates a pairing code for their watch.
- Watch → APIGET /getPlans?code=… with the ETag of the last response.
- API → Watch304 when nothing changed; otherwise the active plan and its metadata.
- Data Fieldclient=datafield&maxItems=40, with truncated and totalItems; on CIQ < 5, background sync.
- compatible watches (Data Field / app)
- 109 / 117
- sync payload
- −97%
- successful builds
- 93/93
- simulator test runs
- 196
Before

After

09
War stories
Three real incidents — backend, apps and watch — with their root cause, the fix and how it was verified.
Payments that tolerate retries
- Problem
- Redsys can notify a payment more than once, and the client can also close it from the app: two paths that could process the same order.
- Root cause
- Without coordination, a retry would repeat steps with side effects: order, stock, points or shipping.
- Fix
- Both paths share a transactional lease lock in Firestore (5 min TTL) and post-processing stores a checkpoint per step; an invalid signature never touches the payment session.
- Result
- By design, a retry only runs the pending steps.
From 51.3 MB to 9.5 MB
- Problem
- The mobile apps' bundle weighed 51.3 MB.
- Root cause
- Unoptimised assets: a single PNG image took 11.7 MB.
- Fix
- Re-encode images as WebP — that PNG became 74.7 KB —, load Sentry lazily and enable the offline Firestore cache.
- Result
- 9.5 MB (−81%) and 0 KB of monitoring on initial load.
Error -402: from 103 KB to 3.4 KB
- Problem
- With a real account, the watch received 103 KB and failed with Connect IQ error -402: the athlete was left without a plan.
- Root cause
- The contract sent every plan the user had, and a single corrupted plan with 603 items took 83.6 KB on its own.
- Fix
- Contract v2: only the active plan with its metadata plus on-demand loading for the rest, backward compatible with earlier versions.
- Result
- 3.4 KB (−97%), deployed in May 2026 and verified end to end against production in a fenix 7 simulator.
Before

After

10
Reliability
- From 6 to 316 test files in 8 months (about 4,300 cases) with Vitest and Testing Library.
- 214 Firestore rules tests against the emulator, run in GitHub Actions.
- CI checks for catalogue drift and function regions.
- Gated deploys: SHA-256 fingerprint secret scanning of the bundle and an email allowlist.
- Connect IQ QA matrix: 93/93 builds and 196 test runs.
11
Product timeline
Jul 2025
First INNER web MVP, in React and Firebase.
Dec 2025
Watch app approved on the Connect IQ Store.
Jan 2026
Watch pivot to a Data Field: athletes don't want to leave their native activity screens.
Mar 2026
Data Field approved on the Connect IQ Store.
May 2026
Sync contract v2: from 103 KB to 3.4 KB.
Sep 2026
Wear OS client (thesis) begins.
Oct 2026
Apps on the App Store and Google Play, race finder v2 and region migration.
12
What I'd do differently
- Split components past 5,000 lines much earlier.
- Move per-instance in-memory rate limiting to a shared store.
- Consolidate Cloud Functions on a single generation (Gen 2).
13
Links
- innerfuelplan.com (opens in a new tab)
- App Store (opens in a new tab)
- Google Play (opens in a new tab)
- Data Field · Connect IQ (opens in a new tab)
- Watch app · Connect IQ (opens in a new tab)
- Instagram · @inner_fuelplan (opens in a new tab)
The code is private (company-owned). I'm happy to walk you through it in a technical interview.