Saena
LiveComplete SaaS Platform for Therapists
About the project
Clinical management platform for psychologists and therapists, designed, developed and deployed solo. Real product with real payments, real patients and real sessions. Includes interactive clinical calendar (drag-to-create, resize, multiple views), video consultations with LiveKit, patient portal, automatic billing with Stripe Connect, bidirectional Google Calendar sync, audio recording with transcription on Cloudflare R2, referral system, multi-therapist organizations with custom branding, transactional emails with Resend, monitoring with Sentry, legal consents, and 3 complete languages. 179 commits, 560 files, ~106,000 lines of TypeScript.
Technologies
Next.js 15React 19TypeScriptPostgreSQLDrizzle ORMStripe ConnectAuth.jsLiveKitGoogle CalendarSentryCloudflare R2TanStack QueryResendVitestPlaywrightDocker
Features
- 179 commits · 560 files · ~106K lines
- Complete clinical calendar: weekly, monthly, 5-day, drag-to-create, drag-to-move, resize
- Stripe Connect: direct onboarding, session billing, QR, auto-charge, 3-layer confirmation
- Real bidirectional Google Calendar sync with echo detection and queue recovery
- Real-time video consultations with LiveKit: secure rooms, per-session tokens
- Patient portal: online booking, history, payments, consents, documents
- Multi-therapist organizations with custom branding, roles, rooms and internal referrals
- In-session audio recording with encrypted Cloudflare R2 storage and speech-to-text transcription
- Automatic invoice system, tax data, bulk issuance and patient invoice portal
- 14 transactional email templates via Resend with dynamic organization branding
- Monitoring with Sentry (server + client instrumentation) and production observability
- 133 unit tests + 49 E2E tests (Vitest + Playwright) · CI/CD with GitHub Actions - Docker - Coolify
Technical challenges
- Complete clinical SaaS architecture from scratch
- Full Stripe Connect: webhooks, polling, instant 3-layer confirmation
- Real bidirectional Google Calendar sync (echo detection, cascade reconciliation)
- Migration from Supabase to pure PostgreSQL + Auth.js v5 + Drizzle ORM (16 schemas)
- Decomposing 3,141-line calendar into 18 focused modules
- Full internationalization in 3 languages (es/ca/en) with ICU plurals
Learnings
- Extreme development speed without sacrificing quality (180+ tests)
- Full-stack architecture with Server Actions + API Routes
- Complete Stripe Connect integration for B2B SaaS
- Bidirectional sync systems with Google APIs
- Production infrastructure: multi-stage Docker, CI/CD, Sentry, Coolify
Personal project. Designed, developed and deployed solo.