Craft Distillery ERP / Enterprise System
nda
PHP 8 Lumen Vue 2 MySQL Docker
Craft Distillery ERP

What it does

This craft distillery ERP is a production tracking system built for a small manufacturer in Chicago. The distillery needed distillery management software that could track their entire operation from raw material purchase to bottled product on a shelf. Before this system existed, the business ran on spreadsheets and basic tools that could not keep up as operations grew. There was no single place where you could see what ingredients were in stock, which batches were in production, how long barrels had been aging, or who worked how many hours last week.

This ERP covers every step. When the distillery orders grain or barrels, the system records it. When production starts a new batch, it pulls from inventory and tracks exactly what goes in. As barrels age, the system knows where each one is, what's inside, and how long it's been sitting. When a product is bottled and shipped, sales and distribution are recorded. At the end of the month, payroll calculates automatically from time tracking data.

Everything is connected. You can trace a single bottle back through the entire chain: which batch it came from, what ingredients went into that batch, who worked on it, how much time they spent, and what it cost. That level of traceability is not just useful for management, it is required for compliance in alcohol production.

Results & Impact

Replaced a patchwork of spreadsheets and disconnected tools with a single system that handles the entire business operation. About 100 users across production, warehouse, sales, and management access the system daily.

Full traceability from raw material to finished product. Any bottle can be traced back to its batch, ingredients, production dates, and labor. This satisfies compliance requirements and gives management visibility into true production costs.

Automated payroll calculation from time tracking data. What used to be a manual process of collecting timesheets, calculating hours, factoring in sick leave and vacations, now runs automatically. Reduced payroll processing from days to hours.

The system has been in production for over 6 years with 3,182 commits, growing alongside the business. It is now in maintenance mode with active development completed.

Key Features

  • Production Cycle Tracking. Track every batch from start to finish. Ingredients consumed, quantities produced, barrel assignments, aging periods. Full chain of custody for compliance.
  • Warehouse & Inventory. Real-time stock levels for raw materials, work-in-progress, and finished goods. Automatic deductions when batches are produced, additions when materials arrive.
  • Time Tracking & Payroll. Employees clock in and out. The system tracks hours, sick leave, and vacations, then calculates payroll automatically. No more manual timesheet collection.
  • Sales & Distribution. Track orders, shipments, and revenue by product, region, and customer. Analytics dashboards show what sells, where, and at what margin.
  • CRM. Accounts, contacts, and interaction history for distributors, retailers, and direct customers. Linked to sales data so you see the full picture per account.
  • Role-Based Access Control. Granular permissions at interface and data level. Production staff see production. Sales see sales. Management sees everything. Configurable per role and per user.
  • Equipment Control. Track distillery equipment: stills, fermenters, barrel racks. Maintenance schedules, utilization tracking, and downtime logging.
  • Data Import & Analytics. Import external data for analysis. Export reports for accounting and compliance. Dashboards for production efficiency, cost analysis, and sales trends.

My Role & Decisions

Role: Primary developer across the full stack. Designed database architecture, built backend APIs, developed frontend interfaces, and managed deployment. Some modules were built entirely from scratch, database through UI. Others were modernizations of existing legacy interfaces where the underlying data model was preserved but the user experience was completely rebuilt.

Why Lumen + Vue 2: Lumen provided a lightweight, API-first PHP framework that kept the backend fast and focused. Vue 2 allowed building rich, interactive interfaces module by module without committing to a monolithic frontend application. Each module could evolve independently, which was critical for a project that grew over 6 years.

Database design: MySQL with a heavily normalized schema reflecting the real business entities: ingredients, batches, barrels, products, employees, customers, orders. The relationships between these entities mirror the physical production flow, so queries like "show me everything that went into this bottle" are natural joins, not complex reports.

Incremental approach: The system was not designed all at once. It started with core production tracking and inventory, then payroll was added, then sales analytics, then CRM. Each module was built when the business needed it, not before. This kept the system practical and grounded in real requirements rather than speculative features.

Technical Challenges

Full production traceability: Tracing a finished bottle back through every step, batch, ingredients, barrel, time spent, cost, requires a data model where every transaction is recorded as it happens. Retroactive corrections (adjusting a batch record after the fact) needed to preserve the original data while showing the correction, creating an audit trail rather than overwriting history.

Interconnected modules: When production consumes inventory, that affects warehouse levels. When an employee logs time on a batch, that affects both payroll and production cost calculations. When a sale is recorded, it affects inventory and analytics. Every module touches others. Changes in one area ripple through the system, so data integrity across module boundaries was a constant architectural concern.

Evolving over 6 years: The business changed. New product lines, new distribution channels, regulatory requirements. A system built in 2019 needed to accommodate needs that did not exist until 2023 or 2024. The modular architecture, separate API endpoints per domain, separate Vue components per module, made this possible without rewriting core functionality.

Permission granularity: Access control operates at two levels: interface access (what screens a user can see) and data access (what records they can read or modify). A production manager should see the production dashboard but not payroll details. A sales rep should see their own customers but not the full revenue analytics. This dual-layer permission system was built early and became one of the most important architectural decisions.

Use Cases

For production managers. Track every batch from grain to bottle. Start a batch, record ingredients used, assign barrels, track aging, schedule bottling. At any point, see exactly what is in production, what is aging, and what is ready to ship.

For warehouse staff. Know what is in stock without counting. Real-time inventory levels updated automatically as materials arrive and batches consume them. No more end-of-day spreadsheet reconciliation.

For management. See the true cost of every product. Materials cost, labor hours, equipment time, all connected to each batch. Know exactly what it costs to produce a bottle, not an estimate from last quarter's averages.

For the accounting team. Payroll that calculates itself. Employees log time against specific tasks and batches. The system calculates hours, applies rates, factors in PTO and sick leave. Export-ready for payroll processing.

Lessons Learned

Build what is needed now, not what might be needed later. Over 6 years, every module was added because the business asked for it, not because I anticipated it. The modules that worked best were the ones built from a real pain point. The few times I built ahead of demand, the feature either needed reworking when the real requirement appeared, or was never used.

Permissions are infrastructure, not a feature. Building the dual-layer permission system early, interface access and data access as separate concerns, saved countless hours later. Every new module automatically inherited access control. If I had treated permissions as an afterthought and bolted them on per module, the system would have become unmaintainable.

Audit trails are not optional in production systems. When someone asks "who changed this batch record and when", you need an answer. Recording every modification with the original value, new value, who changed it, and timestamp was an early decision that proved its worth repeatedly, both for debugging and for regulatory compliance.

FAQ

What does this ERP system cover?

The full production lifecycle of a craft distillery: purchasing raw materials, tracking inventory and barrel aging, managing production batches, calculating payroll from time tracking, analyzing sales and distribution, and maintaining customer relationships. Every step from ingredient purchase to bottled product is traceable.

Why build a custom ERP instead of using SAP or NetSuite?

Craft distilleries have unique workflows that enterprise ERP systems do not support out of the box: barrel tracking with aging periods, batch production with specific ingredient ratios, compliance documentation for alcohol production. Customizing a generic ERP to handle these would cost more than building a tailored system, and the result would still feel like a workaround.

How long was the project developed?

Active development ran from July 2019 to January 2026, with 3,182 commits. The system grew organically alongside the business. Some modules were built from scratch, others were modernized from legacy interfaces. The project is now in maintenance mode.

What was the technology stack and why?

PHP 8 with Lumen framework on the backend, Vue 2 on the frontend, MySQL database, all containerized with Docker. Lumen was chosen for its lightweight API-first approach, Vue 2 for rapid UI development, and Docker for consistent deployment across environments.

Can this architecture work for other manufacturing businesses?

The core patterns apply to any small-to-medium manufacturer: raw material procurement, production batch tracking, inventory management, time and payroll, and sales analytics. The distillery-specific modules would be replaced with industry-specific equivalents, but the architecture and data flow remain the same.

See Also