← All work
cat work/guideus

GuideUs.

A web app that turns a host's photos, voice notes and typed notes into a guide that guests open from a QR code and read in their own language.

Role
Independent creator · architecture, product & operations
Context
Independent product · Sep 2026 – present
Stack
Next.jsReactTypeScriptPostgreSQLSupabaseFirebase AuthGeminiCloud RunCloud TasksStripeRevenueCatOpenTelemetryGrafana
  • 18languages a guide can be read in
  • 0charges or AI calls a reader's visit can trigger, checked by tests
  • 113releases merged to production, September to November 2026
  • 13,650automated tests in the full suite (November 2026)
A furnished living room in a holiday rental

What it is

GuideUs is a web app for writing guides to a place and sharing them by QR code. Holiday-rental hosts use it for check-in, appliances and house rules. A second product line for workplaces adds announcements, floor maps and contacts, and guides that open only with a passcode or a member's sign-in. Guests open a guide in the browser and choose one of 18 languages, Arabic included. It is live at guideus.dev.

How it works

A host adds a photo, a voice note or typed notes for each device or topic. Gemini transcribes the audio and drafts the steps, and the server validates the answer with Zod before saving it. The host edits and approves the draft. Publishing hands the translations to a Cloud Tasks worker, which re-translates only the fields whose source changed. Guest pages read published rows through database functions and a one-minute cache, so switching language never calls the model.

The app is Next.js on Google Cloud Run. PostgreSQL and file storage are on Supabase, and sign-in goes through Firebase Authentication. Hosting plans are sold through Stripe, with RevenueCat deciding entitlements. Plans differ by properties, languages and a monthly AI allowance.

My role

I designed GuideUs and run it in production. That covers the product and pricing model, the architecture and every design ruling, the schema and its 129 migrations, billing, the Google Cloud setup, monitoring, nightly backups and the 90-day data-retention purge. AI agents wrote most of the code under my direction. I wrote and approved the specs, the architecture tests hold the code to the design, and every release to production waited for my approval. Decisions are recorded in seven architecture decision records, and operations in runbooks. Before a release can merge, CI replays every migration on a real PostgreSQL in two orders and runs 91 SQL tests.

git log --decisions

Decisions & trade-offs

The choices that shaped the system, what they bought, and what they cost.

  1. D1

    Re-translate only what changed

    Why
    Pricing promises that manual edits are free, so an edit must not trigger a full re-translation. Every translated field stores a SHA-256 hash of the source it came from, and publishing re-translates only the fields whose hash no longer matches. Editing one section of a 15-section guide in 10 languages costs 10 translation calls instead of 150, and a manual edit calls no model at all.
    Trade-off
    Each section keeps a draft and a live copy, and every translation row carries hashes. Until a publish finishes, guests see the last translation marked as updating. Worth revisiting only if model prices fell so far that this bookkeeping cost more than the calls it saves.
  2. D2

    Guest pages that cannot charge or call AI

    Why
    Readers never pay, and a guest page should not depend on billing or the model. A test walks the import graph of the public guide routes and fails if anything they reach can authenticate, call Gemini, read a subscription or set a cookie. Passcode and members-only pages have their own test that keeps billing and AI out. In the database, the anonymous role has no grant on the guide tables and reads only through functions that return what the page renders.
    Trade-off
    Plan rules that change what guests see exist twice, in TypeScript and in SQL, and parity tests keep the two in step. This one is not up for revisiting. It is a promise to readers, not a technical preference.
  3. D3

    The app checks the tenant, with row-level security as the second lock

    Why
    The data layer should be able to leave Supabase for plain PostgreSQL. All queries go through repository adapters, every account-scoped statement carries the account id the app verified, and the studio connects as a limited role that sets the account for each transaction. Tests fail the build when code outside the adapters imports the driver or a statement leaves out the account.
    Trade-off
    An extra layer today for a move that is not scheduled, and some Supabase shortcuts stay unused. The move itself waits for a concrete driver, whether cost, control, compliance or scale.
  4. D4

    Retries that cannot run anything twice

    Why
    A dropped connection leaves the browser unsure whether a create landed, while the server may still be calling the model. Each create attempt carries a request id drawn in the browser and reused as the row id, so a retry finds what the first send made. An AI call first claims its id in a store every instance shares, so a second send waits for the first answer instead of paying for another call. Releases follow the same rule. Database changes ship before the code that needs them, and CI takes the newest release down and up again to prove its down script restores the schema.
    Trade-off
    Every create path carries an id and a record of what was sent, and a retry whose content changed is refused rather than merged. Each AI call starts with an extra database round trip. Worth revisiting if model calls moved behind a queue that deduplicates by key on its own.
  5. D5

    Per-host AI cost in the database, not in metrics

    Why
    Labelling metrics by host would add series with every customer, against a Grafana free tier of 10,000 active series. Pricing also runs on calendar months. A ledger table records each host's monthly tokens and cost, and OpenTelemetry metrics stay fleet-wide.
    Trade-off
    Two meters with different jobs, and the dashboard needs a read-only database role and its own reporting schema. Worth revisiting if the metrics backend stopped making series the scarce resource.
  6. D6

    Architecture rules as tests

    Why
    A boundary kept by agreement breaks with one import, whoever writes the code. 58 of the 67 repository-wide test files check the source, the import graph, the migrations or the deploy scripts against a rule, from data access and the guest boundary to host-facing text in 18 languages and lock timeouts in new migrations.
    Trade-off
    Text and import scans can over-report or miss an indirect path, and each test is code to maintain next to the rule it guards. When one fails, the fix is the code, not the test. A test changes only when its rule does.
Read as Markdown ↗Next: PixelMe →