Unit tests
737 tests in 78 files (Vitest): usage, forecast, orders, schedule, corrections and cancellations, input validation.
Under the hood
For the curious: technology, tests, architecture and numbers. Everything on this page is calculated automatically on every deployment. It describes version 1.0.1 of 11 November 2026. Česky
npm audit)Tests
Health records and supplies cannot afford a calculation error. Deployment therefore runs the type check and all tests by itself. If anything fails, the new version is not released.
737 tests in 78 files (Vitest): usage, forecast, orders, schedule, corrections and cancellations, input validation.
147 scenarios in 40 files (Playwright). Each runs on iPhone 13 mini (WebKit, the Safari engine) and in Chrome on a computer.
Two devices recording without signal, an outage in the middle of sync, a damaged or deleted file in Drive, restoring from a backup. Nothing may be lost or duplicated.
Automatic accessibility check (axe), text contrast in light, dark and high-contrast modes, measured size and colours of buttons.
A generated 10-year history of about 25,000 records. Recalculating the state must stay under 50 ms.
Calculations are also compared with the history previously kept in a spreadsheet. The real data stays outside the repository, which contains only a made-up set with the same structure.
Architecture
The app does not store a "current state" but every action as a separate event. Supplies, the diary and the forecast are recalculated from them every time (event sourcing).
How it was made
The author did not write myHHD alone. Most of the code, the tests, the translations into 15 languages and this page were written by Claude Code, the AI coding assistant from Anthropic.
The author decides what the app should do and how it should look, approves every change and tests everything on their own iPhone in daily use. The rules Claude follows while working (data protection first, events are never deleted, no treatment recommendations, no release without passing tests) are written down in the repository, and automatic tests guard many of them.
First came about a week of preparation: the author wrote the specification and thought through the technical design. Development started only once the outline of the specification and the technology were clear. Everything essential was then built in 5 working days, including all 737 unit tests. The rest is fine-tuned along the way, during the author's own home dialysis.
Technology
A progressive web app (PWA): it runs in the browser, can be installed on the home screen and works without signal. No server framework, no database at the author's end.
| Library and version | What it does |
|---|---|
| Svelte 5.57.2 | User interface. Compiles to small JavaScript without a runtime framework. |
| TypeScript 6.0.3 | Types in strict mode, errors are found before running. |
| Vite 8.3.4 | Build and splitting the code into parts loaded only when needed. |
| vite-plugin-pwa 2.0.0 | Service worker (Workbox): the whole app on the device, updates in the background. |
| Dexie 4.4.6 | IndexedDB storage in the browser. |
| Tesseract.js 7.0.0 | Reading delivery notes from a photo right on the device (WebAssembly). |
| jsPDF 4.2.1 | Exports and orders as PDF. |
| write-excel-file 4.1.1 | Exports to Excel (XLSX). |
| uqr 0.1.3 | QR codes for payments in the About the author section. |
| Cloudflare Workers 4.151.1 | Hosting and exchanging Google sign-in keys. Health data never goes there. |
| Claude Code | Coding assistant from Anthropic, wrote most of the code, tests and translations. |
| Vitest, Playwright, axe 5.0.5 · 1.64.1 · 4.14.0 | Unit tests, browser tests, accessibility check. |
Code
Security and privacy
The browser may only run scripts from the myHHD website and send data only here and to Google Drive. Even a bug in a library cannot send records anywhere else.
drive.file: in your Drive the app sees only the files it created
itself.
The long-term permission stays on the device. A small function on Cloudflare only exchanges keys, stores nothing and never receives health data.
No cookies, analytics or ads. A problem report is an email with the version and device, without health data.
8 libraries directly in the app (41 packages including their dependencies), 575 including development and test tools.
2.4 MB is stored on the device, after which the app starts without a network. Reading from a photo (14.1 MB) is downloaded only on first use, like PDF, Excel and individual screens.