Repository navigation
28 Technology Stack
This page lists the technologies HealthBook AI (internal code name: BabyCare) actually uses, layer by layer. Every version is quoted from a file in the repository, and the source file is named in each table. requirements.txt holds the allowed ranges; requirements.lock (generated with uv pip compile requirements.txt --universal) holds the exact versions installed in CI and in the Docker image. Where a file gives no version, the table says so.
- Keep the runtime small enough for free hosting tiers (one container, no build step for the web app).
- Prefer libraries that run locally (OCR, PDF, image analysis) over remote services.
- Pin everything that reaches production through the lockfile.
| Component | Version | Source | Use |
|---|---|---|---|
| Python | 3.12 (python:3.12-slim image) |
Dockerfile, ci.yml (python-version: '3.12') |
API, worker, scripts |
| Tesseract OCR engine | apt package tesseract-ocr, no version pinned |
Dockerfile, ci.yml
|
Local OCR for scanned pages and photos |
| PostgreSQL |
postgres:17 image |
ci.yml, docker-compose.postgres.yml
|
CI staging suite, self-hosted database |
| Node.js | 20 |
ci.yml (node-version: '20') |
JS syntax checks, Playwright, Expo tooling |
| Java | Temurin 17 |
ci.yml (actions/setup-java@v5) |
Android Gradle build |
| GitHub Actions |
checkout@v4, setup-python@v5, setup-node@v4, setup-java@v5, upload-artifact@v4
|
ci.yml |
CI |
| EAS CLI | >= 16.0.0 |
mobile/eas.json |
Optional Expo build profiles |
| Library | Range (requirements.txt) |
Locked (requirements.lock) |
Use in the code |
|---|---|---|---|
| FastAPI | >=0.115,<1 |
0.142.2 | HTTP API, routers, dependencies (api/main.py) |
| Starlette | (via FastAPI) | 1.7.0 | Static files, middleware, threadpool |
Uvicorn ([standard]) |
>=0.34,<1 |
0.54.0 | ASGI server (Dockerfile command) |
| Pydantic | >=2.9,<3 |
2.13.5 | Request validation models |
| python-multipart | >=0.0.20,<1 |
0.0.32 | Document and photo uploads |
| SQLAlchemy | >=2.0,<3 |
2.1.3 | ORM, EncryptedText type decorator (api/crypto.py) |
| Alembic | >=1.16,<2 |
1.20.0 | Schema migrations run on startup (api/migrate.py) |
psycopg ([binary]) |
>=3.2,<4 |
3.3.6 (+ psycopg-binary 3.3.6) | PostgreSQL driver, postgresql+psycopg:// URLs |
| cryptography | >=50,<51 |
50.0.2 | Fernet encryption of files and clinical text; EC P-256 keys for VAPID |
| PyMuPDF | >=1.24,<2 |
1.28.2 | PDF validation, text layer, page rendering, PDF appendix (api/extract.py, api/export_pdf.py) |
| pytesseract | >=0.3.13,<1 |
0.3.13 | Python binding to Tesseract |
| Pillow | >=11,<13 |
12.3.0 | Image validation, thumbnails, stool-photo colour analysis |
| pillow-heif | >=1,<2 |
1.8.0 | Optional HEIC decoding |
| ReportLab | >=4.2,<5 |
4.5.1 | PDF export body and vector charts |
| httpx | >=0.27,<1 |
0.28.1 | Supabase Storage REST calls, Expo push, vision provider, test client |
| pywebpush | >=2,<3 |
2.5.0 (+ py-vapid 1.9.4, http-ece 1.2.1) | Web Push delivery (api/push_web.py) |
| python-dateutil | >=2.9,<3 |
2.9.0.post0 | Age arithmetic for the vaccination reference chart |
| python-dotenv | >=1.1,<2 |
1.2.4 | Loads .env (api/config.py) |
| tzdata | >=2025.2 |
2026.5 | IANA zones for per-profile timezones (zoneinfo) |
| filelock | >=3.18,<5 |
4.0.9 | Migration lock, single reminder-worker lock |
| pytest | >=8,<10 |
9.1.1 | Backend test suite |
The email sender (api/mailer.py) uses the standard library (urllib.request, smtplib), not an SDK. The camera worker can read real streams with opencv-python-headless, which is not in requirements.txt; without it the worker raises an explicit error or runs in simulation mode.
| Component | Version | Source | Notes |
|---|---|---|---|
| Application code | none (no framework, no bundler) |
web/*.js, web/index.html
|
Plain script files loaded with defer; node --check in CI |
| Service worker | cache name babycare-shell-v16
|
web/sw.js |
Shell cache only; /api/ never cached; Web Push display |
| Web app manifest | n/a | web/manifest.webmanifest |
Installable app |
| Charts | in-house |
web/charts.js, web/analytics.js
|
No charting library |
| @playwright/test | ^1.63.0 |
package.json (devDependency) |
Browser specs in tests/browser/
|
| Package | Version |
|---|---|
| expo | ~54.0.0 |
| react | 19.1.0 |
| react-native | 0.81.5 |
| typescript (dev) | ~5.9.2 |
| @types/react (dev) | ~19.1.10 |
| expo-secure-store | ~15.0.7 |
| expo-notifications | ~0.32.12 |
| expo-document-picker | ~14.0.8 |
| expo-image-picker | ~17.0.8 |
| expo-image-manipulator | ~14.0.8 |
| expo-file-system | ~19.0.24 |
| expo-sharing | ~14.0.8 |
| expo-clipboard | ~8.0.8 |
| expo-constants | ~18.0.14 |
| expo-build-properties | ~1.0.10 |
| expo-dev-client | ~6.0.21 |
| react-native-safe-area-context | ~5.6.0 |
| react-native-svg | 15.12.1 |
overrides pin postcss to ^8.5.28 and uuid to ^11.1.1. The app identifier and version (1.1.0, versionCode 2) come from mobile/app.config.js.
| Service | Plan stated in code | Used for | Configured in |
|---|---|---|---|
| Render | free web service, Docker runtime | FastAPI API | render.yaml |
| Firebase Hosting | Spark | Static web app and doctor.html
|
firebase.json, .firebaserc
|
| Supabase PostgreSQL | free, session pooler | Database | DATABASE_URL |
| Supabase Storage | free, private bucket | Encrypted originals and photos |
api/storage.py, deploy/supabase/setup.sql
|
| Supabase pg_cron + pg_net | free extensions | Scheduler wake-up | deploy/supabase/setup.sql |
| Brevo or Resend | HTTPS email APIs | Password-reset email | api/mailer.py |
| Expo push service |
exp.host push API |
Android reminders | api/worker.py |
| Browser push services | RFC 8030 + VAPID | Web reminders | api/push_web.py |
| OpenAI-compatible vision endpoint | optional, off by default | Consented transcription | api/providers.py |
DejaVu Sans and DejaVu Serif TrueType fonts in api/assets/fonts/ are embedded in PDF exports so output does not depend on system fonts.
requirements.txt, requirements.lock, package.json, mobile/package.json, mobile/eas.json, Dockerfile, .github/workflows/ci.yml, docker-compose.postgres.yml.
System Architecture · Backend Architecture · Web Application Architecture · Android Application Architecture · Deployment and CI/CD · Design Decisions
Overview
Platform
Identity and access
Medical records
- 10 Document Ingestion
- 11 OCR and Human Verification
- 13 Medicines and Administration
- 14 Vaccination Model
- 15 Labs, Growth, Longitudinal
- 16 Illness and Lifetime Health
Daily care
Output and sharing
Security
Engineering
- 26 Testing and Validation
- 27 Deployment and CI/CD
- 28 Technology Stack
- 29 Design Decisions
- 30 Limitations
- 31 Roadmap