Skip to main content
Engineering10 min readMarch 3, 2026

Compliance in Enterprise Software: What Developers Actually Need to Know

Compliance requirements shape enterprise software architecture in ways that can't be bolted on later. Here's what developers need to understand before writing the first line of code.

James Ross Jr.

James Ross Jr.

Strategic Systems Architect & Enterprise Software Developer

Compliance Is an Architecture Problem

The developers who get burned by compliance requirements are the ones who treat compliance as a layer to add at the end of the project. "We'll build the system and then make it HIPAA compliant." "We'll handle GDPR before launch." "We'll add the audit log module later."

Compliance requirements that are architecturally significant — and most of them are — cannot be added after the fact without expensive rework. The data model needs to be designed for them. The authentication and authorization architecture needs to support them. The logging infrastructure needs to be built with them in mind.

This is not a concern only for large enterprises. Startups building in healthcare, financial services, and HR technology deal with compliance requirements from their first customer. Understanding what these requirements mean for software architecture is foundational, not advanced.

Here's what developers actually need to know.

GDPR: The Data Rights Architecture

The General Data Protection Regulation applies to any system that processes personal data of EU residents — regardless of where your business is located. If you have EU customers, GDPR applies.

The compliance requirements that shape software architecture:

Right to access. Any data subject can request a complete record of all personal data you hold about them. This requires: knowing exactly which tables and fields contain personal data, the ability to query across all of them for a single individual, and the ability to export the result in a portable format. If personal data is scattered across dozens of tables without a clear subject identifier, fulfilling this request is expensive. Design with data subject linkage in mind from the start.

Right to erasure. Data subjects can request that their personal data be deleted. This sounds simple. In practice, it requires: identifying every place personal data exists (including backups, logs, and derived datasets), understanding which data is legally required to be retained (financial records, for example), implementing deletion that preserves data integrity (deleting a user who has placed orders that must be kept requires careful handling), and verifying the deletion was complete.

Soft deletion (marking records as deleted without removing data) doesn't satisfy erasure rights. True erasure does. Design your data model with erasure in mind — using IDs that persist for referential integrity but nullifying the PII is one approach.

Consent management. For data processing that requires consent, you need to: record when consent was given, what the user consented to, how consent was obtained, and support withdrawal of consent. This is often implemented as a consent log table with timestamps, consent type, and the policy version the user consented to.

Data minimization. Collect only what you need. This sounds like a legal principle, not an engineering requirement — but it shapes the data model. Before adding a field, the question should be: do we need this? Not: would it be useful to have this?

Audit logging for data access. Particularly for sensitive categories of data (health data, financial data, special category data), you need logs of who accessed what data and when. This is architectural infrastructure that needs to be part of the system from the start, not bolted on later.

HIPAA: Building in Healthcare

HIPAA (Health Insurance Portability and Accountability Act) governs Protected Health Information (PHI) — any health information that can be linked to an individual. If you're building software that handles PHI, HIPAA compliance is non-negotiable.

The HIPAA Security Rule's technical safeguards that directly affect software architecture:

Access controls. Every user of the system must authenticate. Role-based access controls must limit PHI access to users with a legitimate need. Automatic logoff after inactivity. Unique user IDs — shared accounts don't comply.

Audit controls. Hardware, software, and procedural mechanisms to record and examine activity in systems that contain PHI. This means comprehensive, tamper-evident audit logs of all PHI access — reads, not just writes. The audit log is a first-class system component, not an afterthought.

Integrity controls. Mechanisms to ensure PHI is not improperly altered or destroyed. Cryptographic hashing for sensitive records, integrity validation on data import, protection against unauthorized modification.

Transmission security. All PHI transmitted over networks must be encrypted. TLS 1.2 minimum, TLS 1.3 preferred. Unencrypted transmission of PHI — even internal API calls between services — is not compliant.

Encryption at rest. PHI in storage must be encrypted. This includes database columns containing PHI, backups, log files, and any file storage. Column-level encryption for the most sensitive fields, full-disk or volume encryption for the rest.

Minimum necessary. Users should access only the minimum PHI necessary for their role. This is the principle behind role-based access controls and data segmentation.

The Business Associate Agreement (BAA) requirement is also architectural: if you use third-party services to store or process PHI (cloud hosting, email services, logging platforms), each of those providers must sign a BAA. Choose your infrastructure providers with BAA availability in mind.

SOC 2: The Enterprise Trust Framework

SOC 2 (Service and Organization Controls) is not a regulation — it's a voluntary attestation that your security, availability, processing integrity, confidentiality, and privacy controls meet the Trust Services Criteria defined by the AICPA. It's increasingly required by enterprise customers as a condition of doing business.

SOC 2 Type II requires demonstrating that your controls were in place and effective over a review period (typically 12 months). This means your compliance evidence needs to be continuous, not a point-in-time snapshot.

The controls that most affect software architecture:

Logical access controls. Who has access to what, and why? This includes: unique user authentication, multi-factor authentication for privileged access, role-based permissions, regular access reviews, prompt deprovisioning when access is no longer needed.

Incident response. Documented procedures for detecting, responding to, and recovering from security incidents. This is partly process and partly technology — you need security alerting, logging infrastructure, and documented runbooks.

Change management. Controlled processes for deploying changes. In software terms: pull request review requirements, staging environment validation, deployment approvals, rollback procedures.

Availability. Uptime targets and the architecture to support them. Infrastructure redundancy, monitoring and alerting, disaster recovery procedures.

For most B2B SaaS companies, pursuing SOC 2 Type II is worth the investment when enterprise customers start asking for it — which usually happens earlier than expected.

PCI DSS: If You Touch Payment Card Data

The Payment Card Industry Data Security Standard applies to any system that processes, stores, or transmits cardholder data.

The developer-relevant principle: don't handle raw card data unless you absolutely must. Every requirement in PCI DSS becomes easier when your system never sees the raw card number. Use a payment processor (Stripe, Braintree, Adyen) that handles cardholder data with their own PCI-compliant infrastructure. Your system only ever sees tokens and non-sensitive identifiers.

If you're tempted to store card numbers yourself for any reason — don't. The compliance requirements are extensive, the ongoing audit burden is significant, and the security risk is real. Delegate to the payment processor.

The Audit Log: Non-Negotiable Infrastructure

Across GDPR, HIPAA, SOC 2, and most other compliance frameworks, comprehensive audit logging is a requirement. An audit log that was added as an afterthought is usually insufficient. An audit log that was designed as a first-class system component provides exactly the evidence these frameworks require.

A compliance-grade audit log needs:

interface AuditEntry {
  id: string;              // Immutable unique identifier
  timestamp: string;       // ISO 8601, UTC, server-side generated
  actorId: string;         // Who performed the action
  actorType: string;       // 'user', 'system', 'api_key'
  action: string;          // What action was performed
  resourceType: string;    // What type of resource
  resourceId: string;      // Which specific resource
  ipAddress: string;       // Where the action originated
  userAgent?: string;      // Browser/client information
  previousState?: object;  // State before the action (for changes)
  newState?: object;       // State after the action (for changes)
  metadata?: object;       // Additional context
}

The audit log should be:

  • Written synchronously with the operation it records (not asynchronously, which creates gaps)
  • Stored in tamper-evident storage (append-only, cryptographically signed, or stored in a separate system from the operational database)
  • Retained for the period required by your compliance framework (HIPAA: 6 years, SOC 2: typically 1 year for the review period)
  • Queryable by the data subjects and auditors who need it

Designing for Compliance From the Start

The practical approach: before writing the first line of code, have a compliance conversation with someone who understands your regulatory environment. Document the requirements that affect architecture. Design the data model, access controls, audit infrastructure, and encryption approach to meet those requirements. Then build.

The cost of this conversation upfront is one or two hours. The cost of retrofitting HIPAA-compliant audit logging into a system that was built without it is weeks of engineering and months of catch-up.

Compliance is not a feature to add later. It's a constraint that shapes the architecture from the beginning.

If you're building enterprise software in a regulated space and want to make sure your architecture is designed to meet the compliance requirements from the start, schedule a conversation at calendly.com/jamesrossjr.


Keep Reading