CoachOS Coaching-business delivery and revenue operations
A tenant-isolated workspace for coaches and their staff, with a client portal, automations and AI drafts that always wait for approval.
Built multi-tenant platform. Deployment and live provider keys are not verified.
01
The operational problem Coaching businesses keep leads in one tool, sessions in a calendar, check-ins in forms and payments in a spreadsheet. Renewals are missed because progress is never assembled into proof.
02
The system built An organisation-scoped platform: onboarding builds the offer and programme, leads move through a pipeline, clients get a portal for check-ins and progress reports, and a payment ledger feeds renewal. Automations and AI drafts prepare work; a person approves it.
Multi-tenant RLS test in PGlite Better Auth Approval-gated AI 42 + 38 tests 03
Workflow sequence 01 Lead Coach / staff Pipeline with drag-and-drop and CSV import 02 Purchase Client Offer, programme, payment ledger entry 03 Intake Client (portal) Consent, intake form, calendar invite (.ics) 04 Sessions Coach Today queue, calendar, notes 05 Check-ins Client Check-in builder responses, progress proof 06 Renewal Staff Progress report, automation, AI draft awaiting approval 04
What is actually implemented 7-step onboarding and a coach directory Today queue, lead pipeline with drag-and-drop and CSV import Client 360, programmes and offers, calendar with .ics Check-in builder and progress reports Payment ledger, automations and AI drafts needing approval Client portal and privacy tools: consent, export, deletion, retention purge05
Architecture signals Stack Next.js 16 React 19 Tailwind 4 Neon Postgres Better Auth Cloudflare R2 AI SDK Tenancy and security Row-level security confines every tenant query to one organisation through a restricted role In-organisation role rules enforced in the service layer Invitations hashed with SHA-256, single use; rate limits; CSP and HSTS Demo store refused in production Integrations and adapters Cloudflare R2 (files) Resend (email) Razorpay and Stripe (platform billing) AI providers behind approval Tests 42 Vitest tests including a PGlite row-level-security test 38 Playwright tests: 12 journeys plus axe at three viewports
Deployment Live at coachos-omega.vercel.app (owner-supplied URL, checked 2026-10-18). Live provider keys are not verified. 06
Honest boundaries Calendar sync is an interface only. Content Studio does not publish to social networks. File storage, email and billing are untested with live keys. No HIPAA, SOC 2 or ISO 27001 claim.07
Assets Tenant isolation in CoachOS Two organisations each contain coaches, staff and clients. All queries pass through a restricted database role with row-level security, so each organisation reads only its own rows from the shared tables. ORG A COACH STAFF CLIENT PORTAL ORG B COACH STAFF CLIENT PORTAL ROLE coachos_app · RLS SHARED TABLES · org_id ON EVERY ROW Original system diagram.
02 R36504 FitBud