Project 03 of 84
LineOS
LineOS (formerly studio-os / CarelineOS): one multi-tenant SaaS codebase deployed as five fully isolated vertical products (CARE salon/med-spa, HOLIDAY holiday lighting, JOBBER field service, SITTER babysitting referral, BIKE e-bike rental) on a shared field-service domain kernel.
- Status
- Shipped
- Last activity
- 2026
- Live
- Stack
- TypeScript
- Node.js
- pnpm workspaces
- Hono
- Next.js App Router
- React
- Drizzle ORM
- PostgreSQL
Highlights
- Migrated a 5-vertical SaaS platform plus its staff portal from per-vertical Supabase Auth to a single Zitadel OIDC identity provider over ~5 weeks, shipping over 60 mostly inert-by-default PRs (Terraform-managed orgs/projects, trusted-issuer verification with mandatory azp, JWKS last-known-good fallback, (issuer, sub) identity linking) and completing a canary-first production cutover across 5 APIs and 6 web apps.
- Rehearsed the identity cutover end to end in CI against a throwaway Zitadel instance (identity-e2e), catching three real defects (relink creator-event key, smoke user rows, signup email verification) before they reached production.
- Armed Postgres row-level security in production across three tenant databases (147, 151 and 152 tables) with zero failures, after provisioning non-bypass runtime roles and fixing a Supabase pooler connection-string bug that blocked every RLS-scoped connection.
- Closed a cross-tenant authorization gap in ~20 PRs by requiring the caller's role in the org that owns the target row on every write route (user roles, SSO config, service accounts, payments, client data, field-service, charting, rentals) and filtering list reads to orgs where the caller holds the read role.
- Launched two new verticals on the shared domain kernel: a babysitting-referral vertical (eligibility engine, demand-band pricing, consent-gated public roster) and an e-bike rental vertical (overlap-guarded rental agreements via a Postgres EXCLUDE constraint, delivery reusing field-service dispatch), each with its own dashboard, marketing site and production deploy.
- Built an unauthenticated public booking API for the e-bike vertical backed by Stripe PaymentIntents and verified it end to end from a prospect's website, later adding Turnstile bot checks, an anonymous rate-limit tier and guest-only ownership checks.
- Split every vertical into separate static marketing sites and login-gated app hosts, adding host-scoped noindex, Referrer-Policy on token pages, a reserved-host guard in the API and Terraform-managed SES/DKIM/DMARC for the new domains.
- Cut container build work by collapsing 10-11 per-service Docker image builds into 3 builds with registry-side manifest fan-out, shrank the Temporal worker image from 2.84 GB to 1 GB, and started semver releases (v0.1.0 to v0.12.0 in about seven weeks via release-please).
- Moved production API configuration for five services from container-platform env to AWS SSM Parameter Store applied by Ansible, with a dry-run drift check showing no drift on all five before deleting the old copies.
- Found that 371 of 1,267 Playwright tests (29%) were silently skipping, 285 of them from one misconfigured project-config line; recovered them (one dashboard project from 0 to 285 passing, three suites at 373/285/168 passing with 0 failures, skips down to 21) and fixed six product defects the hidden tests had masked.
- Ran a throwaway spike against the real Claude Code MCP client before building an on-behalf-of (OBO) connection hub, measuring its refresh margin (it refreshes at 300 s or less remaining), parallel-refresh and revoke behaviour; the measurements replaced a planned nine-sibling refresh grace with a one-sibling rule under a row lock and led to a recommended 3600 s default for the facade access token while OBO tokens stay 300 s.
- Built the API half of a multi-vertical MCP connections hub (STS token trust, nine request gates, three grant-store tables, consent, grant, personal-token and admin routes, operator kill switch and alert) inert behind per-vertical and per-org switches, in a 182-file draft PR.
- Drove the hub's API layer red-first against the production auth chain and mutation testing, taking its acceptance-criteria matrix from 19 untested items to zero and finding and fixing six authorization and audit defects, including one where a viewer could obtain a write scope from a legacy token claim.
- Audited production read-only before building the hub and found the rate limiter disabled on all five APIs and the API hosts DNS-only behind Cloudflare, making the client-IP header spoofable; changed the limiter to ignore Cloudflare headers unless explicitly trusted.