Custom Software / Healthcare Operations
DistroDocs — Multi-Company Medical Distribution Platform
Sole developer — architecture, front-end, back-end, database and deployment
A client-owned custom platform designed and developed by Ferdinand Munoz. DistroDocs replaced manual distribution workflows with a reliable, auditable system supporting multiple companies under shared infrastructure.
Overview
DistroDocs is a full-stack medical distribution platform built to support LN Allog, WC Allog and CoreMatrix operating under a shared infrastructure. The platform manages the complete customer lifecycle — from initial onboarding and agreement execution through tiered pricing, order management and compliance logging — replacing a fragmented mix of spreadsheets, email threads and manual approvals.
The Challenge
Medical distributors operating across multiple company brands needed a single platform that could enforce separate branding, pricing tiers and customer relationships while sharing a common operational backbone. Manual onboarding, paper-based agreements and disconnected order tracking created compliance risk and slowed the sales cycle. The platform needed to be secure, auditable and capable of generating legally acceptable documents without third-party services.
Ferdinand's Contribution
Ferdinand designed and built the entire platform from scratch — architecture decisions, database schema, authentication system, front-end interface, back-end API, PDF generation engine and deployment configuration. Every component was built to support multi-company isolation, role-based access and a complete audit trail from first login through order fulfillment.
Application Interface
Privacy-safe mockups — layouts reflect actual screen structure; no real customer data shown
Authentication
Secure login with BetterAuth — two-factor authentication, forced password change enforcement and session management across all company contexts.
Platform Architecture
Front-end
React 19, TypeScript and Vite — responsive interface supporting desktop and tablet workflows for operators and customers. shadcn/ui component library with Tailwind CSS.
Back-end
Express API with structured route handlers, input validation, role-based middleware and company-context enforcement on every protected endpoint.
Database
MySQL with Drizzle ORM — relational schema supporting multi-company data isolation, tiered pricing tables, document storage and full audit logging.
Authentication
BetterAuth with two-factor authentication for agreement signing, forced password change enforcement and session management.
PDF Engine
Custom server-side PDF generation for agreements, order confirmations and compliance documents — no third-party document service dependency.
Transactional email for onboarding, agreement delivery, order status and account notifications.
Security & Data Integrity
Two-factor authentication
Required for agreement signing — customers must complete 2FA before executing any binding document.
Forced password changes
Administrators can require password resets on next login — enforced at the session layer before any protected route is accessible.
Role-based permissions
Operators, administrators and customers have distinct permission sets enforced at the API middleware layer — not just the UI.
Company-aware access controls
Every data query and mutation is scoped to the authenticated user's company context — cross-company data access is structurally prevented.
Audit trails
Every significant action is logged with timestamp, user identity, company context and relevant record reference.
Isolated testing environment
A fully isolated test environment mirrors production configuration — no test data can reach or affect production records.
Protected database migrations
Schema migrations run through Drizzle ORM with explicit version control — no ad-hoc schema changes in production.
Safe production startup
Application startup validates environment configuration and required secrets before accepting connections — misconfigured deployments fail fast rather than silently.
Automated Test Coverage
119
Automated tests passing at the documented project checkpoint
79
Unit & Integration Tests
API route handlers, business logic, validation rules, permission enforcement and multi-company isolation.
40
Database Tests
Schema integrity, migration safety, query correctness and data isolation across company contexts.
119 tests passing at the documented project checkpoint. Coverage continues to expand with each feature addition.
Feature Status
Deployed
BetterAuth authentication — two-factor authentication, forced password change enforcement, session management
Nine-step customer onboarding workflow — account creation, identity fields, company assignment, initial configuration
Distributor agreement presentation and in-platform execution
Electronic signing with 2FA confirmation before document finalization
Document envelopes — server-side generation, storage and retrieval
Tier-based pricing engine — rules configured per customer tier and company, applied at order time
Order placement, operator review queue and status tracking
Company-aware administration — operators scoped to their assigned company context
Role and permission management — operators, administrators and customers with distinct access levels
Server-side PDF generation — agreements, order confirmations and compliance documents
Pending items dashboard — cross-module action queue, company-aware and role-filtered
Audit trail — every significant action logged with timestamp, user identity and company context
Transactional email — onboarding, agreement delivery, order status and account notifications
Multi-company data isolation — LN Allog, WC Allog and CoreMatrix under shared infrastructure
In Development
Expanded reporting and operator analytics dashboard
Enhanced document management and version history
Roadmap
QuickBooks integration for accounting synchronization
Shipping carrier integration and fulfillment tracking
White-label configuration per company brand
Advanced reporting and business intelligence exports
Planned but not yet implemented.
Outcome
The platform replaced a manual, error-prone process with a structured, auditable system. Onboarding, agreement execution and order tracking moved entirely within the platform, giving operators real-time visibility across all three company brands.
Confidentiality
Specific customer counts, revenue figures and internal operational metrics are not disclosed.
Discuss This Work
Have a similar platform challenge? I am available for consulting and contract engagements.