True Care SystemTrue Care SystemDocumentation
Return to Website

TRUE CARE SYSTEM ENGINEERING

Developer Guide

Engineering standards for architecture, repositories, backend, frontend, database, APIs, security, HIPAA, logging, Git, deployment, and AI-assisted development.

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.

Purpose

The Developer Guide defines the approved engineering practices used to build and maintain True Care System. Its purpose is to protect production stability, multi-tenant isolation, HIPAA-aligned auditability, data integrity, and consistent delivery across Web, API, Mobile, background jobs, integrations, and future AI agents.

The standards in this guide are designed for developers, technical leads, QA engineers, security reviewers, support engineers, and implementation partners working on the platform.

Developer Guide index
Developer Guide documentation structure and approved engineering topics.

Core Engineering Principles

TopicStandard
Preserve working functionalityDo not rewrite or remove stable production logic unless the change is required, reviewed, tested, and explicitly approved.
Provider isolationEvery business record and query must enforce the authenticated Provider scope.
Minimal integration pointsNew frameworks such as HIPAA, support, logging, or AI should remain self-contained and integrate through small, explicit, reversible boundaries.
TraceabilitySecurity-sensitive, PHI-related, support, impersonation, billing, and administrative actions must be attributable.
Backward compatibilityChanges must account for existing APIs, data, Mobile versions, scheduled jobs, and integration payloads.
Explicit data ownershipEach module must define which service owns validation, persistence, and state transitions.
No silent fallbackErrors, missing configuration, or invalid states must be surfaced clearly rather than hidden by guessed defaults.

Documentation Pages

GuidePurpose
OverviewEngineering principles, scope, responsibilities, and change governance.
System ArchitecturePlatform components, data flow, multi-tenancy, integrations, and trust boundaries.
Repository StructureApproved organization of API, Web, Mobile, documentation, and shared assets.
Backend StandardsNestJS modules, services, controllers, validation, authorization, and error handling.
Frontend StandardsNext.js and React conventions, data loading, forms, state, accessibility, and stability.
Database StandardsPostgreSQL integrity, Provider scoping, indexes, transactions, and manual SQL discipline.
Prisma StandardsSchema changes, relations, generation, query patterns, and the no-migration policy.
API StandardsRoutes, DTOs, authentication, response structure, pagination, filtering, and version safety.
Security Coding RulesAuthorization, secrets, input validation, tenant isolation, and secure defaults.
HIPAA Coding RulesPHI handling, purpose of use, minimum necessary, audit metadata, and support access.
Logging StandardsOperational logs, audit logs, PHI-safe diagnostics, correlation IDs, and observability.
Git WorkflowBranch discipline, focused commits, review, rollback readiness, and separate deployment units.
DeploymentBuild verification, environment configuration, rollout, smoke testing, and rollback.
AI Coding RulesSafe use of AI assistance without weakening review, privacy, or production safeguards.

Required Change Sequence

  1. Understand the existing workflow.

    Review the current API, database, Web, Mobile, background job, and integration behavior before editing.

  2. Define the smallest safe change.

    Do not combine unrelated refactoring with a production fix.

  3. Protect Provider scope and authorization.

    Confirm every read and write is restricted correctly.

  4. Implement and validate.

    Run type checking, targeted tests, build verification, and manual workflow checks.

  5. Document and commit.

    Record the purpose, affected files, database steps, testing evidence, and rollback approach.