Skip to content
Back to projects

luki fitti

Offline-first workout tracker for Web, iPhone and Apple Watch

PublishedOctober 2026
UpdatedNovember 2026
Open source
TypeScript
Swift
Next.js
NestJS
Prisma
PostgreSQL
Docker
Problem
Logging a workout should not cost attention. Between sets you have seconds, sweaty hands and a rest timer running.
What I built
An offline-first workout tracker that runs sets, suggests when to add weight or reps, and syncs quietly in the background.
Platforms
Web (PWA), native iPhone (SwiftUI), standalone Apple Watch, widgets
Stack
TypeScript, Swift, Next.js, NestJS, Prisma, PostgreSQL, Docker
Outcome
v2.0 on the App Store, AGPL-3.0 open source with a public API and an MCP server

Built for the 90 seconds between sets

The moment LukiFitti is designed around is not the workout. It is the rest between sets. Sweaty hands, a 60-to-180-second timer running, attention measured in seconds. If logging a set takes more than one tap, it gets skipped, and the data that powers everything else is gone.

I built it for people who lift on their own schedule: recreational gym-goers following a split who want to see steady progress, with the phone and often an Apple Watch sitting on the bench next to them. It plans splits, runs a workout set by set with a rest timer, suggests when to add weight or reps, guides stretching routines and tracks meals.

Why yet another tracker? Because it is free forever, has no ads and no subscription, works offline, and everything it knows about you can be exported or pulled through an open API. It is also AGPL-licensed open source, so nobody can take the work and turn it into a closed, paid app.

Train. Eat well. Get stronger. The LukiFitti App Store header.
Figure 1: Train. Eat well. Get stronger. The LukiFitti App Store header.

Offline-first, because gyms have bad wifi

Every client is offline-first. The web app is a PWA that keeps your data in IndexedDB and runs rest timers off timestamps instead of a ticking counter. The native iPhone and Watch apps keep their own local stores. Unsaved changes sit in a local outbox and replay to the server when connectivity returns.

The hard part was not the queue. It was deciding how visible sync should be. I went with "quiet until it matters": no permanent sync badge, no spinner telling you something you cannot change anyway. Sync state only surfaces when you actually need to act, like the one case where clearing Safari website data would lose queued workouts.

Suggestions without the formula names

LukiFitti suggests when to add weight or reps based on your own history. It tracks your recent sessions per exercise, watches for grinding (hard effort, no gain), regressions and plateaus, and then nudges: increase weight, increase reps, deload, maintain, or establish a baseline first.

What it never does is show the math. The app says "+2.5 kg next time", never "Epley" or "EWMA". The engine stays under the hood; the outcome is what matters.

One backend, three frontends

There is one NestJS backend with Prisma and PostgreSQL, and three real frontends on top of it: the web PWA, a native SwiftUI iPhone app and a standalone Apple Watch app that also works as a companion, streaming heart rate and capturing per-set peak and recovery BPM.

The iPhone app adds Dynamic Island and Lock Screen Live Activities, and shared business rules live in with Swift mirrors that are fixture-tested for parity, so a suggestion or a league score is the same number on every platform.

The active workout: one obvious next action, the current set.
Figure 2: The active workout: one obvious next action, the current set.
A progression suggestion shown as plain words, not a formula.
Figure 3: A progression suggestion shown as plain words, not a formula.
Meal tracking with calories and macros.
Figure 4: Meal tracking with calories and macros.
The exercise catalog.
Figure 5: The exercise catalog.
Session history.
Figure 6: Session history.
The standalone Watch app, built for glances between sets.
Figure 7: The standalone Watch app, built for glances between sets.

A loud Social tab inside a calm app

Version 2.0 added friends, weekly leagues, 1v1 duels and cooperative raid bosses. Competition is scored in effort points relative to your own weekly goal: 10 points per working set, a daily cap, anti-cheat rules. A beginner can beat an athlete who is slacking.

The interesting call was tone. The Social tab is allowed to be loud, with full-screen celebrations for promotions, duel wins and boss kills. The workout flow stays calm: no pop-ups, confetti or rank changes between sets. Points and raid damage appear once, on the summary after the workout. And each result is celebrated once, then becomes a quiet entry in history.

Push notifications get their own voice: a mean friend who roasts you into training. The rules keep it funny instead of hurtful: mock the behaviour, never the person; only friends are named; mean in the notification, calm in the app; and at most three social pushes a day so it does not wear out.

Open by design

AGPL-3.0 was a deliberate pick: use it, change it, self-host it, even commercially, but modified hosted versions must stay open source. It matches the feature set: everything exports as a backup file that re-imports cleanly, and importers for GymLife and Alpha Progression bring your existing history with you.

On top of that sits a stable, read-only public API at behind personal access keys () with scopes, expiry and per-key rate limits: the GDPR right to data portability as something you can actually script against. Only hashes are stored, so a database leak does not expose keys.

The newest surface is an MCP server: your AI assistant can answer questions about your own training through the same scoped key, read-only. The server holds no data. Every tool call forwards your key to the API, and tool outputs deliberately strip your free text to keep the prompt-injection surface small.

What's next

2.0 shipped the social layer; the privacy ADR for it is still pending legal review, and OAuth connectors for the MCP server are on the list. Today a pasted key does the job, later the same keys get issued through one-click OAuth. Write scopes for the public API are planned once the read side has settled.