01KLife
Every kilometre, ranked live on race day.
KLife is Krystal Water's fitness app. Every day, people use it to track runs, walks and rides, join challenges and keep their streaks going. On race day it becomes the timing system: each runner's phone measures their race, and results update live for runners, organisers and spectators. I designed the architecture and built every part of it.
Expo · React Native · NestJS · PostgreSQL · Redis · Next.js · 2026

02Highlights
What went into it.
01
Results organisers can trust
Rankings reward runners who followed the official course, not only the fastest clock, and physically impossible GPS points are rejected on the server.
02
Live leaderboards that scale
Standings refresh every three seconds for everyone watching. Each board is computed once and shared, so cost grows with boards, not spectators.
03
Accurate in poor coverage
When GPS weakens, distance falls back to the step counter and motion sensors, then hands back to GPS when the signal returns.
04
A run is never lost
Tracking continues with the screen off or the app killed, shows on the lock screen and Dynamic Island, and every workout is queued until the server confirms it.
05
Native speed
Animations and charts run on the UI thread with Reanimated and Skia, long lists are virtualised, and cached data appears instantly on launch, even offline.
06
One console for the event
Registrations, kit pickup points, live results, announcements by push, SMS and email, moderation and a verifiably fair prize draw, in one admin.
03Architecture
How the pieces talk.
Three applications, one backend image. Phones talk to a NestJS API over REST and WebSockets. The same image also runs as a worker, which keeps GPS processing, notifications and scheduled jobs away from the requests runners are waiting on.
- 01
Mobile app
Expo · React Native · TypeScript
- Clear layers: screens, hooks, actions and a typed API client, with every response validated
- Offline cache on device, credentials in the secure keychain
- Native modules for background GPS, Live Activities and SMS code autofill
REST and WebSockets
- 02
Admin & public web
Next.js · TanStack Query, Table and Form
- A backend-for-frontend keeps admin tokens on the server, never in the browser
- Public registration portal, live leaderboard and shareable activity pages
- Universal links that open shared runs and groups straight in the app
Server-side proxy
- 03
API
NestJS · 200+ endpoints · role-based access
- Rate limiting, authentication and permissions applied to every route
- GPS points validated and written to Redis, never blocking on the database
- WebSocket rooms fanned out across instances through Redis
Queues and streams
- 04
Worker
Same image, worker role
- Streams GPS data into PostgreSQL in bulk
- Delivers push, email and SMS campaigns from a queue
- Runs the event, challenge and streak schedules
Database, cache and storage
- 05
Data
PostgreSQL · Redis · Cloudflare R2
- Relational model covering users, workouts, events, challenges and groups
- Redis sorted sets for leaderboards and sessions
- Media uploaded straight from the device to object storage
04Engineering decisions
Decisions worth explaining.
The calls that shaped the build, why I made them, and what they bought the client.
Decision 01
A custom backend instead of a hosted one
The client first proposed self-hosted Supabase. Live rankings needed a separate write path for GPS data, Redis, WebSocket broadcast and background workers, so I made the case for NestJS and PostgreSQL, documented the trade-offs and built it.
Full control over the real-time path, authentication and hosting, with no vendor lock-in.
Decision 02
Keep the database off the hot path
Incoming GPS points are validated, written to Redis and streamed to a worker that saves them to PostgreSQL in bulk. The API never waits on the database while people are running.
Fast responses at peak load, and a database that sees a few large writes instead of thousands of small ones.
Decision 03
Rank by the course, not just the clock
Testing showed that a time-only ranking let someone run any 5 km and beat runners who followed the route. I encoded the full rule (finished, checkpoints missed, time, coverage) into a single sortable score.
Fair results, ranked identically in Redis, PostgreSQL and the app.
Decision 04
Compute only what someone is watching
A leaderboard is recalculated only while someone has it open, and everyone watching shares the same snapshot.
Server cost stays flat as spectators join on race day.
Decision 05
Separate API and worker roles
One Docker image runs as either an API or a worker. Requests and WebSockets scale independently from queues, schedules and GPS processing, and only one role runs migrations.
Race-day traffic does not compete with background work, and deploys are safe to repeat.
Decision 06
Secure sessions that survive bad signal
Refresh tokens rotate on every use and a replayed token revokes the session. Runners often lose signal mid-refresh, so the app refreshes early, shares one refresh across parallel requests, and the server allows a short grace window.
Strong session security without signing anyone out mid-run.
05Gallery
See it in use.










06By the numbers
7 wks
Figma to app stores01
3 s
Live leaderboard refresh02
3
Platforms: iOS, Android, web03
100
Lighthouse accessibility · web04
07The engagement
My role · Lead engineer · Full stack
The brief and the bar.
The client arrived with a 51-screen design and a fixed date: the Rotary Kampala Cancer Run 2026, over 21, 10 and 5 km. The real work was turning a phone into a timing device people could trust. GPS drops between buildings, Android kills apps in the background, and runners lose signal at the worst moments. The results also had to be fair: someone who cuts the course must never beat someone who ran it. I owned every layer, from the database schema to the App Store release.
- System architecture
- Mobile app
- Real-time backend
- Admin & web
- DevOps & releases
Project facts
- Client
- Krystal Water · Sadja WebSolutions
- Role
- Lead engineer · Full stack
- Team
- Solo, from design to release
- Duration
- 7 weeks
- Year
- 2026
- Status
- Live
Stack
Built with.
Krystal Water's fitness app and the live results system behind the Kampala Cancer Run. iOS and Android app, web admin and a real-time NestJS backend, designed and built end to end.
- Mobile
- Expo
- React Native
- expo-router
- Reanimated
- Skia
- TanStack Query
- Zustand
- Zod
- MMKV
- Web
- Next.js
- React
- Tailwind
- TanStack Table & Form
- Recharts
- Google Maps
- Backend
- NestJS
- Prisma
- PostgreSQL
- Redis
- BullMQ
- Socket.io
- Infra
- Docker
- Coolify
- Cloudflare R2
- EAS Build & Update
- PostHog
Talk it through
Ask me anything.
Every number on this page has trade-offs behind it. I am happy to walk through the decisions, the mistakes and what I would do differently.
08More work
More from the lineup.
All projectsProperty platform · Rent management

753API endpoints
Rans Solutions
Uganda's property marketplace and rent management platform: listings, applications, leases, rent collection and owner reports. I lead the engineering and wrote most of the NestJS API, the Next.js marketplace, dashboards and admin console.
- Live
- 2025 — 2026
- NestJS
- PostgreSQL
- Redis
- Next.js
- Typesense
- Expo
Role Lead engineer · Full stack
Explore RansCorporate site · Recruitment

96Lighthouse performance
Hariss International
A new digital home for the maker of Riham, Oner and Sky View: a fast, editor-run Next.js site on Strapi 5, with a recruitment platform built in for HR.
- Live
- 2026
- Next.js
- Strapi 5
- TanStack
- PostgreSQL
- Cloudflare R2
Role Lead engineer · Full stack
Explore HarissCorporate site · Catalogue

25Brands, one catalogue
Mukwano Group
The corporate site and product catalogue for Mukwano Group: seven divisions and 25 consumer brands, from Nomi and Roki to Sunseed. Editors run all of it from Strapi, and every change is live in seconds.
- Live
- 2025 — 2026
- Next.js
- Strapi 5
- Tailwind
- Redis
- Docker
Role Lead frontend engineer
Explore MukwanoCompany website · CMS migration

542Redirects from WordPress
Sadja WebSolutions website
The rebuild of Sadja's own website, from WordPress to Next.js 16 and Payload CMS. Three languages, seven markets, 197 migrated posts and 542 redirects, so every old link still lands somewhere useful.
- Live
- 2026
- Next.js
- Payload CMS
- PostgreSQL
- TypeScript
- Tailwind CSS
- Docker
Role Lead engineer · Full stack
Explore SadjaHealth platform · Web app

7Role dashboards
Génie Santé
Web platform for a digital health startup in the DR Congo: AI symptom checks, doctor consultations and mobile money payments. I led the build: the French marketing site, onboarding and seven role dashboards in one Next.js 16 app, deployed on every merge.
- Shipped
- 2026
- Next.js
- React
- TypeScript
- Tailwind CSS
- TanStack
- Docker
Role Lead engineer · Web platform
Explore Génie SantéAdmin dashboard · Marketing site

−30%Load time
Telex, now Zedu
Real-time event alerts for engineering teams, built at HNG. I led five frontend engineers on the admin dashboard and worked on the marketing site. Shipped a week early with zero critical bugs.
- Shipped
- 2024
- Next.js
- React
- Tailwind CSS
Role Frontend team lead
Explore TelexDeveloper tool
200+
Active users
STEMSEL online IDE
Browser IDE students use to program STEMSEL IoT chips. Worked on the editor and UI, and trimmed its loading time.
- Shipped
- 2023
- JavaScript
- IoT
- Web
Role Frontend engineer
Explore STEMSELClient work
5+
Projects led
Client platforms at Sadja
Web apps, dashboards and APIs for clients, delivered on schedule. I own timelines, code review and deployment.
- Ongoing
- 2025 —
- Next.js
- Zustand
- Node.js
- Docker
Role Lead software engineer
Explore SadjaThis site
RSC
Server first
This portfolio
Next.js App Router with Payload CMS on Postgres. Server-rendered by default, with light, dark and auto themes.
- Live
- 2026
- Next.js
- Payload
- Postgres
- Vercel
Role Design & build
Explore PortfolioKampala, Uganda · Remote
Build what's next.
Hiring for a lead or senior engineer, or need a product built? Tell me what you are working on.
Get in touch




