
A wellness brand selling supplements, sleep tracking devices, and personalized recovery programs needed an eCommerce platform that could grow into health-adjacent workflows without rebuilding the foundation. The brand was not a covered entity under HIPAA, and most of their current operations did not touch protected health information directly. But their roadmap pointed toward services that would: an upcoming personalized recovery program based on health intake data, a partnership with telehealth providers for follow-up care, and a planned wearable integration that would pull biometric data into the customer profile. Building the eCommerce platform without anticipating those flows would create exactly the kind of architectural debt that becomes expensive when audit obligations arrive. This is a composite case study drawn from real enterprise engagements, anonymized and combined to illustrate the architectural pattern without identifying any single client.
The Future-Readiness Question
The brand’s leadership asked the right question early. Not “how do we comply with HIPAA today” – they were not subject to it today. The question was “how do we architect the platform so that compliance becomes a configuration change later rather than a replatforming project.” That framing is the entire difference between future-readiness and reactive compliance.
The engagement opened with a six-week discovery phase focused on data classification and architectural separation. The output was a document that classified every data element the platform handled or planned to handle, identified which elements were PHI-adjacent under foreseeable roadmap items, and specified handling rules that would let the brand stay outside HIPAA scope for current operations while preparing the architecture for compliance the moment scope expanded. The HHS HIPAA reference framed the obligations the brand wanted the architecture to anticipate.
Data Classification Exercise
The classification work produced a tiered model. Tier one was standard commerce data: name, shipping address, email, payment information (handled by a PCI-compliant payment processor, never stored on the merchant’s systems). Tier two was wellness intake data the brand collected today: dietary preferences, sleep hours, stated health goals – sensitive but not PHI under HIPAA when handled outside a covered entity context. Tier three was data the roadmap would introduce: biometric data from wearable integrations, telehealth consultation notes, personalized program recommendations driven by health intake.
The architectural decision was that tier three data would never live in the commerce database. From day one of the build. Even though tier three data did not exist yet. The principle was that the commerce database stays in commerce scope; sensitive data lives in a separate, BAA-eligible service that the commerce platform can reference but not store.
This decision shaped every downstream architectural choice. The customer profile in Adobe Commerce holds commerce data. A separate service, designed from the start to be BAA-covered when needed, holds wellness intake. A token in the customer profile points to the wellness service when relevant; no wellness data crosses into the commerce database. This separation was operational from launch, even though the wellness service was running outside HIPAA scope at that time. When the roadmap added a telehealth partnership eighteen months later, the brand executed BAAs with the relevant vendors, lit up audit logging on the wellness service, and was operationally HIPAA-aligned for the new flows within sixty days. There was no replatforming, no data migration, no architectural rework.
Separating PHI-Adjacent Flows From Commerce Flows
The hardest engineering work was the customer experience. From the customer’s perspective, the wellness intake flow felt like a single seamless experience. Behind the scenes, the experience was assembled from two separate systems with deliberate separation. The intake form ran in the wellness service, not on the Magento storefront. Submission of the form returned a token to Magento; the token referenced an opaque record the commerce platform could not read. Personalization on the storefront happened by passing the token to the wellness service, which returned a curated product set the storefront rendered. Magento never saw the underlying intake data. The wellness service never saw payment information.
This pattern – call it a federated customer profile – kept the commerce platform out of HIPAA scope while preserving the personalized customer experience the brand depended on. Bemeir’s enterprise Magento practice has used variations of this pattern for several health-adjacent brands, because the alternative (building HIPAA-grade controls into the commerce platform itself) is significantly more expensive operationally and creates audit exposure that brands often do not want to carry.
Architecture Decisions
A handful of specific architectural decisions defined the build. BAA-covered components only for tier three data. The wellness service ran on AWS infrastructure where every dependency had a Business Associate Agreement available, even before the brand was a covered entity. RDS, S3, Lambda, and the application logic were all on services AWS makes BAA-eligible. The day the brand needed BAA coverage, AWS would execute the agreement and the architecture was already aligned.
Encryption at rest and in transit by default. Commerce data, wellness data, and the integration channels between them all used TLS in transit and KMS-managed encryption at rest. This was not a future-proofing concession; it was already best practice for tier two data, and the discipline meant tier three data inherited the same posture without retrofitting.
Audit logging architected from launch, activated incrementally. The wellness service emitted detailed audit events to a separate, write-once log store from day one. The commerce platform’s audit logging was less granular but still captured access to wellness tokens. When the roadmap reached the point of requiring formal audit log review, the logs already existed; the brand turned on the review workflow rather than building the logging.
Identity separation with shared authentication. Customers logged in through a single experience, but the identity service that authenticated them was distinct from both the commerce platform and the wellness service. The identity service issued scoped tokens that the commerce platform and wellness service consumed without trusting each other. This pattern is borrowed from financial services architecture and adapts well to commerce-plus-health workflows.
Documentation Rigor for Future Audits
The brand’s leadership understood that future audits would judge decisions made years earlier, often by people no longer at the company. The engagement produced documentation aimed at that future audit, not at current operations. Architecture diagrams. Data flow specifications. Decision records explaining why specific separations existed. Threat models walking through the failure modes the architecture protected against. Runbooks for incident response that would still be readable to a new compliance officer in three years.
Bemeir’s approach treats these documents as deliverables of the same weight as the running code. They live in version control, they get updated as the architecture evolves, and they survive personnel changes on both sides of the partnership. The NIST cybersecurity framework provides one useful framing, and the brand’s documentation maps to it loosely so that future SOC 2 or HIPAA work can lean on existing artifacts rather than start fresh.
Data Type, Handling Decision, Future-Flexibility Preserved
| Data Type | Handling Decision | Future-Flexibility Preserved |
|---|---|---|
| Customer name, address, email | Stored in Magento commerce database, encrypted at rest | Standard commerce flows continue unchanged regardless of compliance scope expansion |
| Payment instruments | Tokenized through PCI-compliant payment gateway, never stored on merchant systems | PCI DSS v4.0 client-side script controls already in place; no architectural change for future requirements |
| Wellness intake (dietary, sleep, goals) | Stored in separate wellness service on BAA-eligible AWS infrastructure | If brand becomes covered entity, BAA activation aligns the service immediately |
| Biometric data from future wearables | Architected to land in wellness service, never in commerce database | Wearable integrations connect to wellness service via token; commerce platform stays out of scope |
| Telehealth consultation notes | Architected for future addition to wellness service with stricter access controls | Access scoping and audit logging already in place; controls tighten through configuration, not redesign |
| Customer authentication credentials | Managed by separate identity service with scoped token issuance | Identity service can integrate with HIPAA-aware authentication providers when required |
| Audit logs across all systems | Emitted to write-once log store from day one, retained per longest applicable obligation | Audit retention policy adjusts through configuration; the logs themselves already exist |
| Personalization recommendations | Generated in wellness service, returned to commerce as opaque product sets | Personalization logic can grow more sophisticated without exposing source data to commerce |
What This Build Avoided
The contrast that matters is the build the brand could have done. A single Magento installation holding all customer data, all wellness intake, all future biometric data. That build would have shipped faster and cost less initially. Eighteen months in, when the telehealth partnership materialized, the brand would have been looking at a months-long project to extract wellness data into a separate system, retrofit audit logging, sign BAAs with vendors, and revalidate every integration. The cost of that rework typically runs three to five times the cost of building the separation correctly the first time. More importantly, the rework period creates a window where the brand is operating with mismatched architecture and compliance obligation, which is the worst possible posture under audit.
The future-ready build cost roughly fifteen percent more upfront. The brand absorbed that cost knowingly, because the leadership team understood the tradeoff. Eighteen months later, when the telehealth partnership went live, the brand activated the relevant compliance controls in sixty days. There was no architectural debt to pay down. The investment had compounded into operational flexibility.
The Pattern Generalizes
This case study describes wellness commerce, but the pattern applies broadly. Any enterprise whose roadmap includes future regulatory scope expansion – financial services peripherals approaching Gramm-Leach-Bliley obligations, alcohol delivery brands adding age-verified cannabis lines, B2B platforms expanding into government contracting that triggers ITAR or CMMC – benefits from the same architectural separation. The principle is consistent: keep the regulated workflow out of the commerce platform from day one, even before regulation applies, so that the regulation’s eventual arrival becomes a configuration event rather than a replatforming event.
For technical leaders weighing future-readiness investment, the math is straightforward. The discount rate on architectural debt is steep. Money spent now on separation, documentation, and BAA-eligible infrastructure pays back the moment regulatory scope expands – and the regulatory environment for health-adjacent commerce, financial peripherals, and data-sensitive B2B is moving in only one direction. Bemeir treats this kind of pre-regulatory architecture as a default for enterprise builds with foreseeable scope expansion, including Hyvä-based storefronts where the rendering





