PLATFORM DESIGN
System Architecture
Understand the major platform components, trust boundaries, data flow, and multi-tenant architecture.
Production stability and security notice
Development changes must preserve working functionality, Provider isolation, role-based access, HIPAA auditability, released Mobile compatibility, and integration stability. Never deploy AI-generated or unreviewed code directly to production.
Platform Components
| Topic | Standard |
|---|---|
| Web | Next.js and TypeScript application used by Provider office, clinical, billing, payroll, compliance, and administrative users. |
| API | NestJS service containing business logic, authorization, validation, integrations, and persistence. |
| Mobile | React Native / Expo application for DSP workflows, EVV, Daily Notes, incidents, call-off requests, messages, and BSS. |
| Database | PostgreSQL database accessed through Prisma and controlled SQL. |
| Storage | Supabase Storage for authorized documents, reports, logos, and attachments. |
| EVV Integration | Sandata client, employee, and visit submission workflows with sequence and transaction tracking. |
| Background processing | Scheduled or queued tasks for notifications, reports, integrations, and operational maintenance. |
Trust Boundaries
- Browser and Mobile inputs are untrusted.
- Provider identity must come from authenticated server context.
- External integration responses must be validated and stored with transaction evidence.
- Secrets must remain server-side.
- Support impersonation requires explicit authorization, expiration, and audit linkage.
Multi-Tenant Rule
Mandatory Provider scope
Every Provider-owned record must include and enforce providerId. Queries, updates, deletes, exports, alerts, reports, and background jobs must not cross Provider boundaries.
