Skip to content
All projects

Custom software / Healthcare operations

DistroDocs

A multi-company medical distribution platform connecting onboarding, agreements, tier pricing and order workflows.

My role
Sole developer — architecture through deployment
Status
Deployed · Client-owned
Scope
Customer lifecycle, document workflows and company-aware access

The problem

One backbone. Separate company contexts.

Medical distributors needed to manage company-specific customers, pricing and agreements through shared infrastructure. The previous workflow relied on spreadsheets, email threads and manual approvals.

My contribution

I built the platform end to end.

I designed and developed the application architecture, database schema, authentication, front-end, API, PDF engine and deployment configuration. Company isolation and role-based access shaped the customer journey from onboarding through order review.

Solution / Engineering decisions

Enforce boundaries in the API.

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

PostgreSQL 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.

Email

Transactional email for onboarding, agreement delivery, order status and account notifications.

Security and data-integrity decisions

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.

Platform delivery

Delivered features and what comes next.

Explore the deployed features, work in development and future plans.

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

Historical project checkpoint: 119 tests passing — 79 unit/integration and 40 database tests.

What this delivers

A connected customer lifecycle.

I brought onboarding, agreement signing, pricing and order tracking into one platform. Operators can follow each customer’s progress in one place, while separate company contexts and role-based access keep each team’s work organized.

Web-platform design and delivery