尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证A personal caffeine tracker that models what is actually in your bloodstream, not just how many cups you drank.
翻译准备中
取自仓库 README
正在加载完整 README。 以下为已保存的摘录。
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.查看完整 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.