Therapy Marketplace is a monorepo for an MVP that connects clients with therapists based on language, country, and service type. The web app provides the discovery experience, while the API handles authentication, booking workflows, therapist-related session flows, and integrations for recording and transcription.
The current implementation already includes role-aware authentication, booking request endpoints, shared domain constants for locales and services, and infrastructure wiring for PostgreSQL, Redis, Agora webhooks, and transcript processing.
This project is structured around a therapy marketplace use case:
- Clients can register, log in, verify email, and create booking requests.
- Therapists can access therapist-specific session queue endpoints.
- Moderators have protected moderation endpoints.
- The web frontend exposes the initial marketplace flow for selecting language and country, then browsing available therapy services.
- The backend is prepared for session recording and transcription workflows through Agora and transcription modules.
Shared package definitions keep user roles, supported locales, and core service slugs consistent across the API and web app.
- Next.js 15
- React 19
- TypeScript
- Tailwind CSS
- NestJS 11
- TypeScript
- TypeORM
- Passport JWT authentication
- class-validator / class-transformer
- PostgreSQL 16
- Redis 7
- Docker Compose for local infrastructure
- Agora webhook integration
- AssemblyAI-ready transcription configuration
- npm workspaces
- Shared internal package:
@therapy/shared
.
|- apps/
| |- api/ # NestJS backend
| \- web/ # Next.js frontend
|- packages/
| \- shared/ # Shared roles, locales, service types, and common contracts
\- infrastructure/
\- docker-compose.yml
- JWT-based auth with register, login, refresh, and current-user endpoints
- Email verification flow
- Role-aware guards for client, therapist, and moderator access
- Booking request creation for therapy sessions
- Shared therapy service catalog and locale support (
en,sr) - PostgreSQL-backed domain model for users, therapist profiles, availability, bookings, content, recordings, transcripts, and contact inquiries
- Agora recording webhook entrypoint
- Transcription module wiring for post-session processing
- Node.js 20+
- npm 10+
- Docker Desktop or another Docker runtime
npm installCopy .env.example to .env in the repository root and fill in any required secrets.
Important variables include:
PORTfor the API serverDATABASE_URLfor PostgreSQLJWT_ACCESS_SECRETandJWT_REFRESH_SECRETREDIS_URL- Agora credentials
- S3 storage credentials for recordings
ASSEMBLYAI_API_KEYfor transcription
docker compose -f infrastructure/docker-compose.yml --env-file .env up -dThis starts:
- PostgreSQL on
localhost:5432 - Redis on
localhost:6379
Frontend:
npm run dev:webBackend:
npm run dev:apiDefault local URLs:
- Web app:
http://localhost:3000 - API:
http://localhost:3001/api
From the repository root:
npm run dev:web
npm run dev:api
npm run build
npm run lint
npm run typecheckThe API applies a global /api prefix and request validation via NestJS ValidationPipe.
Current endpoint areas include:
/api/auth/*/api/sessions/*/api/webhooks/agora/recording
An HTTP request collection is available in apps/api/src/requestsAPI.http for local API testing.
- Supported locales: English (
en) and Serbian (sr) - Core services: individual, couples, teen, coping-with-move
- User roles: client, therapist, moderator
This repository is positioned as an MVP foundation. The core scaffolding for marketplace discovery, auth, session booking flows, and integration points is in place, while production concerns such as full UI flows, external service credentials, and deployment hardening still depend on environment-specific setup.