Skip to content
HIPAA Compliant AppSecure healthcare engineering

Guide

HIPAA-Compliant App Architecture: Reference Patterns and Trade-offs

A HIPAA compliant app architecture is one where the places that hold or process ePHI are few, well known, protected by layered controls and fully auditable. Good architecture makes the Security Rule's technical safeguards structural rather than something each developer has to remember.

This guide describes a reference architecture we use as a starting point and the patterns that adapt it to different products: PHI segmentation, tokenization, zero-trust access, logging pipelines, multi-tenancy and disaster recovery. Every pattern has trade-offs, and the right choice comes from your risk analysis.

Key takeaway

A HIPAA-compliant architecture minimizes and isolates the components that touch ePHI, encrypts data in transit and at rest with managed keys, authenticates and authorizes every request, sends tamper-resistant audit events to a central pipeline, and supports tested backup and recovery. It runs only on BAA-covered, HIPAA-eligible services, and no architecture by itself makes an organization compliant.

Last reviewed November 17, 2026

The reference architecture, layer by layer

Most healthcare apps we design fit a layered model. The names change by cloud, but the responsibilities stay the same.

LayerResponsibilitiesKey safeguards
ClientsWeb, iOS and Android apps, EHR-launched SMART appsTLS, secure token storage, no PHI in analytics or push payloads, session timeouts
EdgeCDN, web application firewall, API gatewayTLS termination with modern ciphers, rate limiting, request validation, bot protection
IdentityIdentity provider, SSO federation, token serviceMFA, unique user IDs, short-lived tokens, scoped OAuth 2.0 grants
Application servicesBusiness logic split into PHI and non-PHI servicesAuthorization on every request, input validation, PHI-safe logging
DataDatabases, object storage, search, caches, queuesEncryption at rest with KMS keys, private networking, least-privilege service roles
IntegrationFHIR, HL7 v2, vendor APIs, interface enginesMutual TLS or OAuth client credentials, message validation, replay protection
Observability and auditLogs, metrics, traces, audit events, SIEMPHI redaction, immutable audit storage, alerting, retention policies
PlatformAccounts, networks, CI/CD, infrastructure as codeSeparate production account, policy guardrails, reviewed deployments

PHI segmentation: shrink the blast radius

The single most effective architecture decision is to keep PHI in as few places as possible. Split services so that scheduling availability, content, feature flags, marketing pages and billing configuration never handle PHI, while a smaller set of clinical services do.

Segmentation reduces the number of components that need BAA-covered services, audit logging and deep security review. It also makes the marketing site and public content safe for tools such as analytics that you would never allow near PHI.

  • Place PHI services and data stores in a dedicated production account or subscription with restricted access.
  • Use private subnets and private endpoints for databases and storage; no public IPs on data stores.
  • Make network paths explicit: only named services may call PHI services, enforced by security groups and service identity.

Tokenization and identity vaults

Tokenization replaces direct identifiers such as name, date of birth, MRN or SSN with opaque tokens. The mapping lives in a small, heavily protected vault service. Downstream systems such as analytics, search indexes or queues work with tokens, and only services with a specific need can detokenize.

The trade-off is complexity and latency: every display of a patient name requires a vault call, and the vault becomes a critical dependency that must be highly available. Tokenization is most valuable where large volumes of data flow to systems that do not need identity, such as event pipelines and reporting.

Zero-trust ideas applied to healthcare apps

Zero trust means no request is trusted because of where it comes from. Each request is authenticated, authorized against policy and logged, whether it comes from the internet, a corporate network or another service in the same cluster.

Strong identity for users

MFA for workforce users, phishing-resistant factors for administrators, and conditional access based on device and risk signals where available.

Strong identity for services

Workload identity or mutual TLS between services instead of shared secrets or network location.

Per-request authorization

Policy checks on the resource being accessed, including patient, tenant and role, not just a valid token.

Just-in-time administrative access

Engineers request time-bound production access that is approved, logged and revoked automatically.

The audit logging pipeline

Audit controls are a required standard under 45 CFR 164.312(b). Architecturally, treat audit events as data with their own pipeline rather than as lines in an application log.

Each PHI read, create, update, delete, export and permission change emits a structured event with actor, patient or record identifier, action, timestamp, source and outcome. Events flow through a queue to write-once storage and to a SIEM for alerting. Application logs and traces go through a separate path that redacts PHI before it leaves the service.

  1. 1

    Emit

    A shared library records audit events at the authorization layer, so a new endpoint cannot skip them.

  2. 2

    Transport

    Events go to a durable queue so a logging outage does not lose records.

  3. 3

    Store

    Write-once object storage with retention locks and a separate account that application roles cannot modify.

  4. 4

    Analyze

    A SIEM correlates audit events with authentication logs and raises alerts for anomalies such as bulk record access.

  5. 5

    Review

    Scheduled reviews and customer-facing audit reports turn the data into evidence.

Multi-tenant patterns and their trade-offs

Healthcare SaaS products serve many covered entities, and each customer will ask how its data is separated from others. There are three common patterns, often combined.

PatternStrengthsTrade-offs
Shared database with tenant ID and row-level securityLowest cost, simplest operations, easy cross-tenant upgradesIsolation depends on code and policy correctness; harder to offer per-tenant keys or residency
Schema or database per tenantStronger logical isolation, per-tenant backup and restore, per-tenant keys feasibleMore migrations to run, connection management overhead, more complex reporting
Account or deployment per tenantStrongest isolation, satisfies demanding enterprise requirementsHighest cost and operational burden; upgrades must roll across many stacks
Hybrid: pooled by default, siloed for enterpriseMatches cost to customer requirementsTwo operating models to maintain and test

Disaster recovery and contingency patterns

The Security Rule requires a contingency plan with data backup, disaster recovery and emergency mode operation plans (164.308(a)(7)). Architecture determines whether those plans are achievable. Set recovery time and recovery point objectives with clinical stakeholders, because an outage of a medication or monitoring app has different consequences than an outage of a billing tool.

DR patternTypical fitTrade-offs
Backup and restore to another regionMost apps with tolerance for hours of downtimeLowest cost; longest recovery time; must test restores regularly
Pilot lightApps needing faster recovery at moderate costCore data replicated and minimal infrastructure ready; scale-up during failover takes time
Warm standbyClinical apps with tighter recovery targetsScaled-down copy running in a second region; higher cost and drift risk
Multi-region active-activeHigh-availability platforms with strict uptime needsHighest cost and complexity; data consistency and conflict handling are hard

Integration, analytics and AI paths

Integration and data platforms are where PHI most often escapes the boundaries the core architecture draws. Treat each as its own zone with explicit controls.

EHR integrations should run in dedicated services with their own credentials, scoped to the FHIR resources or HL7 message types they need, and with every inbound and outbound message logged by identifier. Analytics pipelines should receive de-identified or tokenized data by default, with a documented exception process for identified data. AI features that send PHI to a model provider should go through a gateway service that enforces which providers are allowed (only those under a BAA), strips unneeded fields, records prompts and responses according to policy and applies output checks before results reach clinicians.

  • Message queues and event streams that carry PHI need the same encryption and access controls as databases.
  • Search indexes are data stores: restrict which fields are indexed and protect the cluster like a database.
  • Caches such as Redis often hold PHI briefly; enable encryption in transit and at rest, and set short expirations.

Mapping the architecture to HIPAA

HIPAA requirement

What the rules themselves require

  • Access control with unique user IDs and emergency access procedures (164.312(a)).
  • Audit controls that record activity in systems containing ePHI (164.312(b)).
  • Contingency plan including backups and disaster recovery (164.308(a)(7)).
  • BAAs with cloud and other vendors, and use of services covered by those BAAs.

Recommended practice

Widely accepted security practice

  • Encryption at rest and in transit with managed keys for all ePHI stores and paths.
  • Separate production account with guardrail policies and infrastructure as code.
  • Immutable, centrally collected audit logs with alerting.

Architecture decision

Depends on your product and risk analysis

  • Tokenization or identity vaults for direct identifiers.
  • Per-tenant databases, keys or deployments.
  • Warm standby or active-active multi-region designs.

Your organization's responsibility

Policies and operations software cannot do

  • Setting recovery objectives with clinical and business owners.
  • Testing the contingency plan and documenting results.
  • Reviewing audit logs and acting on alerts.
This page is general information about software engineering for healthcare, not legal advice. HIPAA compliance depends on your organization's risk analysis, policies, workforce practices, vendor agreements and how PHI is actually handled. No software, hosting provider or development partner can make an organization compliant on its own, and there is no official HIPAA certification for applications.

Frequently Asked Questions

What does a HIPAA-compliant app architecture look like?

Typically a layered design with clients, an edge layer, an identity provider, application services split into PHI and non-PHI parts, encrypted data stores on private networks, integration services, and a central audit and observability pipeline, all running on BAA-covered, HIPAA-eligible cloud services.

Do I need microservices for a HIPAA-compliant app?

No. A well-structured modular monolith can meet the same safeguards. What matters is limiting which components can access PHI, enforcing authorization consistently and logging access. Service boundaries are one way to do that, not the only way.

Is multi-tenant SaaS allowed under HIPAA?

Yes. HIPAA does not prohibit shared infrastructure. You need effective logical isolation, access controls and audit logging, documented in your risk analysis. Some enterprise customers will request stronger isolation such as separate databases or deployments.

What is tokenization in healthcare apps?

Tokenization replaces identifiers like names or MRNs with opaque tokens and keeps the mapping in a protected vault. Systems that hold only tokens are less sensitive, though data may still be PHI if it can be linked back to individuals.

Does HIPAA require multi-region disaster recovery?

No. HIPAA requires a contingency plan with backup and disaster recovery procedures, but it does not prescribe a specific pattern. Choose recovery objectives based on clinical impact and your risk analysis.

Where should audit logs be stored?

In storage that application roles cannot modify or delete, ideally a separate account with write-once retention. Logs should record PHI access events without containing unnecessary PHI themselves.

Does zero trust satisfy HIPAA requirements?

Zero trust is a recommended approach, not a HIPAA requirement. It supports required standards such as access control, authentication and audit controls, but you still need the risk analysis, policies and other administrative safeguards.

Plan your HIPAA-compliant app with engineers who start from the data flow.

Tell us what you are building. We will respond with questions about scope, integrations and PHI handling, then a structured estimate. Please do not include patient information.