Architecture¶
The repo is one pnpm monorepo with two people at the center: the senior, who uses the phone app, and the Loved One, who curates content for them from a browser. Everything else exists to move content between those two safely.
flowchart LR
subgraph people [The people]
mobile["apps/mobile<br>Senior's phone app<br>Expo · React Native"]
web["apps/web<br>Loved One's web app<br>React · Vite"]
end
subgraph cloudflare [Cloudflare]
worker["apps/api<br>Data-plane API<br>Worker · Hono"]
d1[("D1 senior-health<br>accounts, memory bank")]
r2[("R2 senior-health-media<br>uploaded photos")]
pages["Cloudflare Pages<br>this docs site"]
end
subgraph processing [Media processing, parked]
fastapi["backend/<br>FastAPI<br>Pillow · ffmpeg"]
end
deepgram["Deepgram<br>speech to text"]
shared["packages/shared<br>role codes · API types"]
docs["docs/ + mkdocs.yml<br>Material for MkDocs"]
mobile -->|"Stories questions,<br>photo moments"| worker
web -->|"sign in, author questions,<br>upload photos"| worker
worker --> d1
worker --> r2
fastapi -->|"/transcribe"| deepgram
docs -->|"strict build on push"| pages
shared -.->|"types"| worker
shared -.->|"types"| web
The pieces¶
| Piece | What it is |
|---|---|
apps/mobile |
The senior-facing Expo app (SDK 57, React Native 0.86, Expo Router). Routes in app/ are thin re-exports; real code lives in src/, built from the Daybreak tokens and primitives. |
apps/web |
The Loved One web app (React + Vite). Sign in, author quiz questions, and upload photos to the senior's memory bank. |
apps/api |
The data-plane API: a Cloudflare Worker (Hono) in front of D1 for accounts and the memory bank, and R2 for uploaded media. |
backend/ |
A stateless FastAPI service for media processing: Pillow thumbnails, ffmpeg video metadata and thumbnails, and Deepgram transcription. Parked: nothing calls it (below). |
packages/shared |
Role codes, display labels, and API types shared by the web app and the Worker. |
docs/ |
This site, built with Material for MkDocs and published by Cloudflare Pages. |
How the phone finds the Worker¶
The mobile app talks to one service, the Worker (src/features/bank/):
EXPO_PUBLIC_DATA_API_URL when set, as in preview and production builds.
Otherwise the address is derived from the Expo dev server, so simulators,
emulators, and physical devices reach the Worker on the laptop with zero
configuration.
The backend is parked¶
Since November 15, 2026 nothing calls the FastAPI backend. The phone app
reached it for one thing, voice answers (POST /transcribe, on to
Deepgram), and voice answers were taken out that day with the app's client
for it (src/lib/api.ts); preview and production builds no longer carry
EXPO_PUBLIC_API_URL. Before that, production builds pointed at
api.equalentry.com, a tunnel to a laptop, which answered only while that
laptop ran both the tunnel and the backend.
The code, its tests, and pnpm dev:backend stay. What to know before using
it again, including that /transcribe checks no key, is in backend/README.md
under "Parked".
Stories merges the fetched memory-bank questions and photo moments with the
bundled seed content in src/features/stories/use-story-pool.ts, keeping an
offline cache in AsyncStorage so a dropped connection never empties the
session.
When something fails¶
- The Worker. Cloudflare keeps its logs, from the first Worker deploy
after November 15, 2026 (
observabilityinapps/api/wrangler.jsonc): every request, everyconsole.errorline, and any uncaught error. On the free plan that is 200,000 log events a day, kept for 3 days. Read them in the Cloudflare dashboard under Workers & Pages,senior-health-api, Observability, or watch them live withcd ~/Documents/GitHub/SilverApp/apps/api && npx wrangler tail --env production. Before that date a failure could be read only whilewrangler tailwas running. Cloudflare prices logs differently from December 1, 2026; look at what the free plan includes then. - The phone app. Apple collects a native crash, such as Build 52's at launch on iOS 27, and shows it in App Store Connect under TestFlight, Crashes. A JavaScript error is reported nowhere yet (Backlog).
- The web app. Nothing is reported. The person sees the page's error line, and the Worker's log holds the request that failed.
How this site is published¶
Cloudflare Pages watches the repo and runs the strict MkDocs build on every
push to main; the settings it needs are in the repository README. The same
strict build runs as a check on every pull request, so a broken link is
caught in review rather than in a deploy.