---
title: "Artisan Manufacturing ERP"
description: "Supply chain and production system for artisan manufacturing"
canonical: https://erpstack.io/case-studies/shwet-artistry-erp
markdown_url: https://erpstack.io/case-studies/shwet-artistry-erp.md
publisher: ERPStack
---

# Artisan Manufacturing ERP

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.

**Client:** Reference Build
**Sector:** retail
**Date:** 2024-11-22

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.

## Compliance scope

- SOC 2

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

## 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

| Measure | Value |
| --- | --- |
| Verification Overhead | 2ms |
| Artisan App Bundle | 42KB |
| Inventory Write Latency | <10ms |
| Artisans onboarded | 500+ |
| Idempotent API routes | 118 |
| Production tracking views | 42 |
| Payout delay reduction | 92% |

## Results

- **Data Models:** 36
- **API Routes:** 118
- **Dashboard Pages:** 42
- **Lines of Code:** 68K+

## Infrastructure stack

- React
- Node.js
- TypeScript
- MongoDB Atlas
- Azure
- shadcn/ui
- Tailwind CSS

## Engagement detail

# 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:
1. **Artisan Mobile Portal:** A lightweight, mobile-responsive web app where artisans update garment statuses and view pending payments.
2. **Central Warehouse Dashboard:** An interface built with React and shadcn/ui for cataloging raw materials, dispatching materials, and executing quality control reviews.
3. **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.

## Frequently asked questions

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