Case Study - Structured Operational Framework for Manufacturing & Formulation Infrastructure

Engineering a constraint-based manufacturing and formulation infrastructure — from practitioner onboarding to integrated payments to live manufacturing submission — for an epigenetics company operating in a regulated environment with no existing solution.

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

Results at a Glance

Implementation: Integrated multiple lab vendors (e.g., TruDiagnostic + external labs) into a single ingestion pipeline, transforming raw reports into structured data. Wrapped Biohax's epigenetic formulas in an API service connected to automated order management, billing, and notifications.

Impact: Cut manual lab-to-order processing from multiple days to under 30 minutes for each patient workflow (fewer handoffs, fewer errors). Enabled Biohax to operate a B2B2C and DTC epigenetic program on one platform, ready to white-label to additional clinics without rebuilding infrastructure.

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 an epigenetics 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

Full-Stack Edge AI Product Engineering — Hardware to Market

Engineering the complete product stack for a revolutionary edge AI device — from hardware-software integration and firmware optimization to product site, investor materials, and go-to-market infrastructure.

Read more

AI Boundary Control Layer for Production SaaS Platform

Engineering a constraint-layer architecture for a production SaaS platform — integrating retrieval, permissioned agent workflows, and cross-environment deployment constraints within a live production ecosystem.

Read more

Deploy AI as infrastructure — not experiment.

30-minute architectural review. Direct. Structured. No pitch deck.

Our Office

  • Melbourne, FL
    2412 Irwin St
    Melbourne, FL 32901