Personal caffeine intake tracker with a pharmacokinetic model.
Translation pending
HealthTypeScript · HTMLGitHub @MeisdyOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
A personal caffeine tracker that models what is actually in your bloodstream, not just how many cups you drank.
Taken from the repository README
Loading the full README. The saved excerpt is shown below.
Install on Android: open that link in Chrome, tap Open the app, then ⋮ → Install app. It lands on your home screen and runs offline from then on.
Tapping the link from inside the GitHub mobile app opens a webview, which cannot install a PWA. Use ⋮ → Open in browser first, or paste the URL into Chrome.
Firefox for Android does not support PWA install and is unsupported. Chrome, Edge, Samsung Internet, Brave and Opera all work.Read the full README ↗▶ Watch the 43-second tour of setup and use.
Install on Android: open that link in Chrome, tap Open the app, then ⋮ → Install app. It lands on your home screen and runs offline from then on.
Tapping the link from inside the GitHub mobile app opens a webview, which cannot install a PWA. Use ⋮ → Open in browser first, or paste the URL into Chrome.
Firefox for Android does not support PWA install and is unsupported. Chrome, Edge, Samsung Internet, Brave and Opera all work.
Install on iPhone / iPad: open the link in Safari, tap Open the app, then Share → Add to Home Screen (on iOS 26, leave Open as Web App switched on). If Add to Home Screen is not in the list, scroll down and tap Edit Actions to add it. Since iOS 16.4, Chrome, Edge and Firefox on iOS offer the same option in their share menu.
On iOS, use the Home Screen icon rather than a Safari tab. Safari can delete a website's data after about 7 days without a visit, but a Home Screen web app keeps its own storage. The daily digest notification is not available on iOS, because Safari does not support Periodic Background Sync.
A personal caffeine tracker that models what is actually in your bloodstream, not just how many cups you drank.
Installable as a Progressive Web App on Android and iOS. All data lives on the device in IndexedDB — there is no backend, no account, and nothing is ever transmitted anywhere.
This is not medical advice. Every number it shows is an estimate from a population model.
A one-compartment model with first-order absorption, the Bateman function:
C(t) = (dose / Vd) · ka/(ka − ke) · (e^(−ke·t) − e^(−ka·t))
Vd = 0.6 L/kg × body weightke = ln(2) / personal half-lifeka = 5.0 /h, placing the peak near 45 minutes after intakeDoses superpose linearly. As a sanity check, 100 mg in a 70 kg adult peaks at about 2.1 mg/L after 44 minutes, which matches published values.
Baseline 5 h, adjusted multiplicatively and clamped to 2–15 h:
| Modifier | Factor |
|---|---|
| Smoking | ×0.65 |
| Oral contraceptives | ×1.9 |
| Pregnancy, 1st / 2nd / 3rd trimester | ×1.2 / ×1.7 / ×2.8 |
| Liver impairment, mild / moderate / severe | ×1.5 / ×2.5 / ×4.0 |
| Age 65+ | ×1.1 |
Two things are deliberately not half-life modifiers:
The cutoff is judged on the worst concentration across the first 90 minutes of sleep, not on the level at the instant of bedtime. A coffee drunk just before bed has barely been absorbed at lights-out but peaks while you are trying to fall asleep. Using the onset window also makes the projection monotonic in intake time, which is what lets the solver use simple bisection.
The default sleep-disruption threshold of 1.0 mg/L is a cautious margin, not a measured value. Drake et al. (2013) found that 400 mg taken even 6 hours before bed cut objectively measured sleep by more than an hour; in this model that leaves about 4.3 mg/L at bedtime for a 70 kg adult with a 5 h half-life. No lower dose was tested, so no safe level is established. The default sits well below that, at the same level the phase model treats as the onset of a noticeable effect. It is editable on the Profile screen.
Tolerance is an exponentially weighted mean of daily intake with a 7-day half-life, normalized against 400 mg/day. Withdrawal risk compares today against that weighted habit, and only fires for someone with an established habit to withdraw from.
src/
domain/ pure model — no React, no IO, fully unit-tested
data/ Dexie schema, seed catalog, repositories, JSON backup
ui/ screens, components, hooks
notifications/ service worker, daily digest, best-effort cutoff watcher
domain/ imports nothing from the other layers, so every number the app claims can be tested and audited in isolation.
npm install
npm run dev # http://localhost:5173
npm run test # domain unit tests
npm run build # type-check, then production build into dist/
Service workers require HTTPS or localhost. Plain HTTP over a LAN address will not install the app, so test PWA behaviour against the deployed URL rather than npm run dev on a LAN IP.
Pushing to main runs .github/workflows/deploy.yml, which tests, builds, and publishes to GitHub Pages.
One-time setup:
main.caffeine-tracker, update basePath in vite.config.ts to match. A mismatch there is the most common way this setup silently breaks — the service worker registers against the wrong scope and the app will not install.To install on Android: open the Pages URL in Chrome, then menu → Install app. Chrome, Edge, Samsung Internet, Brave and Opera all work. Firefox for Android does not support PWA install and is unsupported. On iOS, use Share → Add to Home Screen from Safari (or Chrome, Edge or Firefox on iOS 16.4+).
AGPL-3.0-or-later. See LICENSE.