Year

2026

Healthcare · Therapy SaaS

Duration

12+

Three-app monorepo

web · api · worker, plus one shared zod-contracts package. Postgres 16 + Redis 7 underneath. npm workspaces, no Turborepo.

TRS overview

A small npm-workspaces monorepo. The web app is Next.js 16 (App Router, React 19, Tailwind 4) — public marketing plus role-gated client and therapist surfaces. The api is NestJS 11 with Prisma 6, Helmet, Throttler, Passport JWT and class-validator. The worker is plain tsx-run TypeScript: a tick loop that runs four idempotent jobs per cycle. A single shared package, @trs/shared, ships zod contracts, enums and constants in both .ts and .cjs to be consumable across all three apps. Six services in docker compose; only the edge proxy is publicly reachable, everything else lives behind it on a private internal network.

Mechanics
  • apps/web — Next.js 16 marketing + role-gated client / therapist app, JWT session cookie issued by Next route handlers.
  • apps/api — NestJS 11 + Prisma 6, AES-256-GCM EncryptionService, Stripe webhook with raw-body verification.
  • apps/worker — tsx ESM tick loop: reminder-scan, renewal-scan, no-show-sweep, notification-dispatch.
  • packages/shared — zod schemas + enums + constants, ships .ts and .cjs.
  • Private EU-region VPS · automated-TLS edge proxy · signed-image CI/CD pipeline.
Three apps, one shared package, six services in compose.
Three apps, one shared package, six services in compose.
More deep dives

Got something
this size?

Big ambitions, we match the energy. Drop a brief — reply within one working day.