Architecture diagram: a Flutter phone app writing directly to Firestore via a custom token, with Cloud Run, Cloud Storage, Firebase Hosting and a weekly Google Sheet sync, all on free tiers

This app runs my health data, every day, and it costs me nothing to host. Not "cheap" — actually £0, on Google Cloud free tiers. Here's how the pieces fit.

  • Firebase Hosting serves the web build.
  • Cloud Run runs a small Hono server for the AI calls and the /api/mcp endpoint.
  • Firestore holds the treatment and health data.
  • Cloud Storage holds files and exports.
  • A weekly Google Sheet sync gives the clinical team a read-only summary — no new app, no login.

The one choice that matters

Here's the bit I'm proud of. Treatment data is written client-side, straight to Firestore, using a custom auth token — it does not go through Cloud Run.

Why? Cloud Run scales to zero on the free tier, which means a cold start when it wakes up. A few seconds of "please wait" is fine for a chat reply. It is not fine when I'm mid-treatment trying to save a reading. So the write path that has to be instant skips the server entirely and talks to the database directly. The server is only in the loop for things that can tolerate a pause.

The transferable idea

Don't put your whole app behind one tier of infrastructure. Find the one path that must never stall, and architect that path for it — even if it means a different route than everything else. Free tiers are generous if you respect where their sharp edges are.

Designing cloud architecture that's both cheap and dependable — knowing which corners are safe to cut and which aren't — is a big part of what I do at twentytwotensors. Get in touch if that's useful.