Inspiration
I drink coffee and energy drinks regularly, and caffeine also appears in some headache medicines. I kept asking a simple question:
How much caffeine is probably still in me right now?
Most caffeine trackers stop at a daily total. But timing changes everything. A drink in the morning and the same drink late at night are very different decisions, even if the total is identical.
I wanted to build a tool I would actually open several times a day: calm, visual, and useful without pretending to be a medical instrument.
What I built
Cafade is a visual caffeine tracker for iPhone. Every drink becomes part of a living fade curve.
The Today screen shows an estimated current amount, the timeline shows how each intake contributes, and the History and Insights screens help users notice patterns around their last drink and sleep target.
Logging is designed to be fast. Users can choose from suggested drinks, repeat recent entries, create custom drinks, or enter a known caffeine amount manually. A Home Screen widget also shows the current estimate and provides a quick way to log another drink.
How the estimate works
Cafade uses a transparent half-life model:
$$R(t) = \sum_i D_i \cdot 2^{-\frac{t-t_i}{h}}$$
where:
- (D_i) is the caffeine amount logged at time (t_i)
- (h) is the selected half-life assumption
- (R(t)) is the estimated caffeine remaining at time (t)
Each intake creates its own fading curve, and those curves are added together. This means that a later drink immediately changes the estimate instead of being hidden inside a daily total.
The model is intentionally simple and adjustable. It does not measure blood caffeine concentration, absorption, sleep quality, or an individual's metabolism. It is an estimate for reflection and planning, not medical advice.
Design focus
The central interaction is the changing liquid-like estimate. The caffeine amount gently moves as time passes, while the curve grows when another drink is logged and gradually fades afterward.
I wanted the experience to feel more like observing a physical substance than filling out a spreadsheet. Warm colors, soft gradients, restrained motion, and editorial typography make a technical model feel approachable without turning it into a game.
The design also respects Reduce Motion and uses clear labels and accessible controls throughout the app.
How I built it
Cafade is a native SwiftUI app for iOS 26.
The core experience is local-first and does not require an account. The US drink catalog is stored as versioned JSON, separate from the SwiftUI views and calculation layer, so new products and caffeine amounts can be added without rewriting the app's interface.
The app uses:
- SwiftUI for the interface
- WidgetKit and App Intents for the quick-log widget
- HealthKit for optional write-only logging to Dietary Caffeine
- RevenueCat and StoreKit for subscriptions, trials, entitlement state, and restore purchases
- GitHub and Cloudflare Pages for the source repository and public website
HealthKit is optional. If permission is denied, the core caffeine tracker continues to work normally. The first release does not read sleep or other health data.
Challenges
The biggest challenge was communicating uncertainty without making the product feel vague. Caffeine data varies by product, serving size, region, and person. I chose to make the assumptions visible instead of hiding them behind a precise-looking number.
Another challenge was making multiple intakes easy to understand. A single daily total is simple, but it hides the effect of timing. The timeline and layered fade curve show how separate drinks accumulate and decline together.
I also wanted the subscription to feel natural. The free experience supports the basic loop of logging caffeine and viewing the current estimate. Cafade Pro adds longer history, weekly patterns, sleep comparison, and what-if previews for people who want deeper reflection over time.
What I learned
A simple model becomes much more useful when users can see the inputs, assumptions, and changes over time.
I also learned that permission failures must never block the core experience. HealthKit can add value, but manual logging has to remain complete on its own.
Finally, a data-driven catalog is essential for a product that depends on regional products and changing caffeine information. Separating catalog data from the app logic makes future localization and updates much easier.
What's next
The next steps are regional catalogs, starting with Japan, more transparent product sourcing, and continued refinement of the visual model based on real-world feedback.
Cafade should remain a calm tool for understanding a daily habit—not a diagnostic system.
Log in or sign up for Devpost to join the conversation.