Architecture to Code

Convert blueprint into a deployable starter package.

Generate application scaffolding, Infrastructure as Code, security scan commands, and cloud connection checklists from the ADRs, diagram, security review, and delivery blueprint.

Implementation Summary

This starter package turns the HIPAA-aware patient portal blueprint into a focused Next.js API/application scaffold with Terraform for the AWS perimeter, compute, storage, and audit foundations. It is designed as a deployable starting point, not a complete clinical product.

Stack Recommendation

Use Next.js with TypeScript for the portal and API surface, PostgreSQL through RDS for workflow data, private S3 for document handling, Cognito for identity, and Terraform for AWS infrastructure. Keep the MVP small: portal screens, API routes, audit middleware, document service abstractions, and deployment-ready infrastructure modules.

Repository Structure

apps/portal

Next.js patient and staff portal.

packages/domain

Shared patient, appointment, message, and audit types.

infra/terraform

AWS infrastructure modules and environment configuration.

security

Security scan scripts and policy checks.