Case Study - Structured Control Framework for Manufacturing & Formulation Infrastructure

Engineering a control-layer manufacturing and formulation infrastructure — from practitioner onboarding to integrated payments to live manufacturing submission — for a health-tech company operating in a regulated environment with no existing solution.

Client
Biohax Scientific
Year
Service
Infrastructure Engineering, Manufacturing Integration, Payment Systems, HIPAA Compliance Architecture

System Architecture Snapshot

  • Data Layer — Ingredient catalog with live manufacturer API sync, enrichment metadata
  • Control Layer — Multi-role access enforcement, formula validation gates, HIPAA audit logging
  • Processing Layer — Dynamic pricing engine, payment pipeline, manufacturing order orchestration
  • Deployment Layer — 12 independently deployable function modules, CI/CD with environment isolation

The Challenge

Biohax Scientific is a health-tech company building a custom supplement formulation platform for healthcare practitioners — enabling doctors, nutritionists, and wellness professionals to design personalized supplement formulas down to individual ingredient and dosage, then route them through manufacturing and fulfillment.

The founding team had a clear product concept but no technical infrastructure:

  • No existing platform - the workflow (ingredient selection → dosage configuration → pellet count validation → payment → manufacturing submission) had to be designed from scratch
  • Third-party manufacturing integration - orders needed to flow directly to the contract manufacturing partner via a proprietary API for catalog lookup, stock validation, and order submission
  • HIPAA compliance - the platform handles patient health information (names, addresses, practitioner-patient relationships), requiring HIPAA safeguards from day one
  • Multi-role access control - Admins, Vendors (practitioners), and Patients each needed different views and permissions across the same platform
  • Payment complexity - a dynamic pricing model with a base fee plus ingredient-specific surcharges required tight payment processor integration with real-time price calculation before charge

The Solution

BeeNex architected and deployed the Biohax Scientific platform end-to-end — backend API, admin dashboard, payment infrastructure, manufacturing integration, and compliance framework.

Multi-Role User Management

A complete identity and access system supporting three user types - Admin, Vendor, and Patient - each with role-specific endpoints. Vendors self-onboard via a web registration flow or are invited by an Admin. Patients are created as subcollections under their Vendor, maintaining clear data ownership. Every role check is enforced at the API layer, not just the frontend.

Ingredient Catalog with Live Manufacturer Sync

The ingredient library merges two data sources in real time: the manufacturing partner's catalog (product codes, stock levels, pricing) and Biohax's own enrichment data (health effects, biomarkers, contraindications, dosage-per-pellet). Admins manage the enrichment layer; manufacturer data refreshes live on every query. The result is a single, unified ingredient view with 20+ health effect categories for practitioners to browse.

Formula Builder with Validation Engine

Practitioners create custom supplement formulas by selecting ingredients and specifying dosages. The backend enforces business rules automatically: maximum 700 pellets per formula, all ingredients must be enabled and in stock, ingredient references validated against the catalog, and formulas scoped by visibility - Biohax-created formulas are global, vendor-created formulas are private.

Dynamic Pricing & Payment Pipeline

Every order starts at a $199 base price. Premium ingredients add per-unit surcharges calculated in real time. The pricing configuration is served via a public API so the frontend always reflects current pricing without hardcoded values. The payment flow: frontend fetches pricing → calculates total → backend creates a payment intent with the exact amount → payment confirmed → only then does the order proceed to manufacturing. A webhook handler processes post-payment events automatically.

Manufacturing Partner Integration

The most complex integration on the platform. Once payment succeeds, the order payload is transformed into the manufacturer's expected format and submitted via their Order API - including ingredient code mapping, shipping address formatting, real-time stock validation, and order serial number tracking from the manufacturer's response.

Warning Management System

A rules-based warning engine tied to specific ingredient codes and trigger conditions. When a practitioner builds a formula, the system checks active rules and surfaces relevant warnings - supporting safe formulation practices without blocking the workflow.

HIPAA Compliance Engineering

A 900+ line compliance checklist covering all HIPAA safeguards - administrative, physical, and technical. Key controls: Firestore security rules enforcing role-based access at the database layer, all write operations restricted to backend-only, data encryption at rest and in transit, audit logging on every API operation, and BAA-covered Firebase services throughout.

  • React + TypeScript (Vite)
  • Python 3.13 Cloud Functions
  • Cloud Firestore
  • Firebase Authentication
  • Payment Processing
  • Manufacturing Partner API
  • Firebase Hosting
  • GitHub Actions CI/CD

Technical Scope

Independently deployed Cloud Functions
12
RESTful API endpoints
20+
Ingredients with live stock data
200+
Formula → Payment → Manufacturing automation
End-to-end

The platform ships as 12 independently deployable Python function modules - each with its own dependencies, testable and deployable without touching the rest. The order pipeline is explicitly designed as a multi-step transaction: validate → price → charge → submit → record, with each step failing independently with clear error handling and rollback semantics.

Integration test suites cover auth, validation, payment flow, and manufacturing order submission. The deployment model supports both production and test environments with identical configuration, enabling confident iteration without production risk.

More case studies

Cross-Repository Retrieval Infrastructure with Structured Access Controls

Architecting a cross-repository retrieval infrastructure that unifies Box, Google Drive, and SharePoint data sources with structured access controls to analyze years of historical grant data for a philanthropic foundation.

Read more

Enterprise AI Systems Architecture & Operational Integration Framework

Architecting a phased AI systems integration framework across 15 enterprise platforms for a multi-regional commercial real estate management company — from discovery through deployment specification.

Read more

Ready to build a system your team can rely on?

30 minutes. No pitch deck. We'll map your architecture needs and tell you honestly if we're the right fit.

Our Office

  • Melbourne, FL
    2412 Irwin St
    Melbourne, FL 32901