D2C / Artisan Fashion
Artisan Manufacturing ERP
Supply chain and production system for artisan manufacturing
Quick Summary / TL;DR
An artisan manufacturing business needed an automated operational portal to track decentralized fabric supply chains and settle artisan payouts without delays or inventory leakage. ERPStack developed a custom React-based supply chain dashboard with idempotent payout endpoints, cutting payout cycles from three weeks to under two hours.
- 500+
- Artisans onboarded
- 118
- Idempotent API routes
- 42
- Production tracking views
- 92%
- Payout delay reduction
A bundle is not a unit — it's five pools
Handcraft production returns work in trickles, not truckloads. The WIP ledger models each bundle as per-stage piece pools, so a thousand-piece order can have work at every stage simultaneously — and payment follows the pieces, not the paperwork.
One bundle · 1,000 pieces in flight
QC-passed batches of 20–100 promote incrementally — the bundle never waits as a unit
- 120Dispatch
- 540Craftwork
- 180Finishing
- 100QC Return
- 60Inventory
Final-stage passes post straight to inventory — no waiting for full settlement
Three verdicts, three destinations
Every QC return is a decision about where pieces go next. The system never lets a verdict be ambiguous about inventory or money.
Passed
Immediately fills the next stage’s pool — or posts straight to inventory at the final stage.
Rework
Stays on the assignment; re-enters a pool only after passing re-QC.
Rejected / Lost
Dead pieces: drained at dispatch, never returned to any pool.
The challenge
An artisan manufacturing business needed to scale its manufacturing supply chain while keeping track of materials and artisan payments across multiple regions. Their manual invoicing and physical tracking sheets led to payout delays and material loss, throttling their retail expansion. They needed an automated system to coordinate independent artisans and streamline production status.
The architecture
We built a custom supply chain and production dashboard that coordinates artisans with central warehouses. The platform utilizes React, Node.js, and MongoDB for real-time inventory tracking, and integrates NextAuth for secure role-based portals. We implemented idempotent API endpoints to prevent double payouts and automated tax calculations, providing complete audit trails for every material transaction.
The invariants that keep decentralized money honest
Five hundred independent artisans means five hundred concurrent ways for balances to drift. These rules are enforced in code paths, not in training sessions.
Vendor ledger reversal
Re-settling an assignment reverses prior balance deltas before writing new entries — naive delete-and-rewrite drifts balances.
Cost snapshot honesty
costPerPiece returns 0 when nothing is completed; it never divides by total pieces to fake a number.
Optimistic concurrency
Financial models version every write — a stale concurrent edit fails loudly instead of silently overwriting.
Month-close gate
Inventory, vendor-ledger, and invoice-order reconciliation checks must all pass before a month closes.
- 36
- Data models
- 118
- API routes
- 42
- Dashboard pages
- 68,847
- Lines of code
Case Study: Artisan Manufacturing Supply Chain ERP
Executive Summary
This document outlines the custom supply chain and manufacturing ERP platform developed for an artisan manufacturing business — an artisan-focused fashion brand coordinating production across hundreds of decentralized home-based workshops. Before this system, the brand faced major issues tracking raw material consumption, resulting in a 14% inventory loss and substantial artisan payout delays. We engineered a custom React-based supply chain dashboard that cut payout times by 92% and reduced material loss to under 0.5%.
The Business Challenge
Coordinating decentralized manufacturing is a logistics challenge. The brand provides raw fabrics and dyes to independent artisans, who craft custom garments and return them for quality control and packaging. The brand lacked a central record of which materials were with which artisan. This led to inventory shortages and payment disputes. Additionally, manual invoice calculation was a primary bottleneck, taking weeks for the administrative team to process and verify.
System Architecture
The Artisan Manufacturing ERP leverages a modular, cloud-deployed server architecture:
- Artisan Mobile Portal: A lightweight, mobile-responsive web app where artisans update garment statuses and view pending payments.
- Central Warehouse Dashboard: An interface built with React and shadcn/ui for cataloging raw materials, dispatching materials, and executing quality control reviews.
- Payout Settlement Engine (Node.js): Automates payment runs using idempotent transaction APIs to prevent double-payout errors.
[Artisan Portal] ──(API Update)──> [Node.js Engine] ──(Transactions)──> [Database Logs]
│
[Warehouse Portal] ──(Material Dispatch)─┘
Key Engineering Decisions
- Idempotent API Endpoints: Built strict request tokens into the payout API. If a network drops during a transaction, retrying the request will never create double charges or incorrect payouts.
- Component-driven UI Design: Used Tailwind CSS and shadcn/ui to rapidly construct clean and accessible dashboard pages.
- NextAuth for Multi-role Security: Provided secure credentials and RBAC over the React dashboard, restricting access by role (Artisans vs. Warehouse Operators vs. Finance Admin).
Database Schema & Optimization
The database schema tracks material states through custom workflows. We optimized transactional updates by indexing status fields:
- Indexing
(artisan_id, status, updated_at)allows instant generation of payment statements. - Schema validations in MongoDB ensure material weights and counts match catalog standards before dispatches are approved.
Security & Compliance Controls
The supply chain ERP implements strict controls to ensure financial and data audit integrity:
- SOC 2 Compliant Action Logs: Every material status change and payout event generates a tamper-evident audit record.
- Data Transit Security: Enforced strict HTTPS encryption and API token rotation protocols to protect artisan contact details.
- Continuous Integration Scans: CI/CD deployment pipelines run automated unit and integration tests on every TypeScript change to prevent payment calculation bugs.
Results & Retrospective
The implementation of the custom supply chain ERP delivered rapid results for the brand:
- Artisan payout cycles dropped from three weeks to under two hours, boosting satisfaction and collaboration.
- Material tracking cut annual inventory loss from 14% to less than 0.5%.
- The platform scales to support over 500 active artisans on MongoDB Atlas without database bottlenecking or latency spikes.
- Centralized dashboard operations enabled the administrative team to manage double the production volume with half the manual effort.
Engineered capabilities
- Real-time production and order status tracking
- Automated tax and payout calculations
- Vendor portal with data concurrency controls
- Audit logs for every material transaction
- Material inventory management
- Automated payment settlements
- Idempotent API endpoints to prevent double payouts
- Consignment and consignment sales workflow
Technical performance telemetry
Infrastructure stack
Where this engagement sits
This is 1 of 3 published engagements for the same artisan D2C brand. The Artisan Manufacturing ERP documented here is the production and payout half of a single TypeScript system on MongoDB Atlas — 36 models, 118 REST routes, 42 pages, 68,847 lines — whose order-to-cash and GST layer is written up separately as the Order-to-Cash & GST Compliance Engine, and whose paid-media reporting is covered by the Meta Ads Performance Analytics Pipeline.
Questions buyers ask about the Artisan Manufacturing ERP
How does the ERP track materials across decentralised artisan workshops?
Through stage pools rather than batch hand-offs. A 1,000-piece bundle does not move as a unit: QC-passed batches of 20–100 pieces promote into the next stage — Dispatch, Craftwork, Finishing, QC Return, Inventory — while the remainder stays behind. Rework returns to the same assignment until it passes re-QC, and rejected pieces drain at dispatch and never re-enter a pool. That model is why the MongoDB Atlas ledger behind Artisan Manufacturing cut inventory loss from 14% to under 0.5%.
How are duplicate artisan payouts prevented?
With idempotency in API design applied to money. All 118 REST routes in the Artisan Manufacturing ERP, served by Node.js, carry a request token when they move value, so a retried call after a dropped connection resolves to the existing payout instead of creating a second one. Re-settling an assignment reverses the prior vendor-ledger deltas before writing new entries rather than deleting and rewriting, and every financial model versions each write, so a stale concurrent edit fails loudly. Payout cycles fell from 3 weeks to under 2 hours.
What stops the month from closing on inconsistent numbers?
A hard gate with 3 reconciliation checks: inventory consistency, vendor-ledger consistency, and invoice-order reconciliation. If any of the 3 disagrees, the month does not close. Cost snapshots are equally strict — costPerPiece returns 0 when nothing is completed rather than dividing by total pieces to manufacture a plausible number. Across 42 React production tracking views the same Artisan Manufacturing figures appear for finance, the warehouse and the artisan.
What does the Artisan Manufacturing platform run on?
React and TypeScript on the front end with shadcn/ui and Tailwind CSS, Node.js services behind a REST API, MongoDB Atlas for the 36 data models, and Microsoft Azure for hosting. NextAuth drives RBAC across 3 portal roles — artisans, warehouse operators and finance administrators. SOC 2-style action logs give every material movement and payout event a tamper-evident immutable audit trail, and the platform holds 500+ active artisans without latency spikes.