尚未偵測到更新。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.