SregERP: Light-Steel DDD Modular Monolith

A 9-crate Rust + Svelte 5 ERP for light-steel manufacturing with meter-level stock segment lineage, cut optimization, and realized-waste accounting.

  • Rust & Axum 0.8
  • DDD Modular Monolith
  • SQLx & PostgreSQL 16
  • Svelte 5 Runes
  • Cut Optimization
Wisma Karya / Lentera Baja

Challenge

Generic inventory systems count discrete SKUs, which fails completely in light-steel (baja ringan) manufacturing and distribution where every cut of a spandek roofing sheet or 50m coil creates child segments, offcut remainders, and potential margin leakage.

Approach

We engineered SregERP as a 9-crate Rust DDD modular monolith (kernel, inventory, sales, procurement, fulfillment, hr, organization, expenses, web_api) on Axum 0.8, SQLx 0.9, and PostgreSQL 16, paired with a SvelteKit 5 runes interface. Every physical sheet is tracked as a StockSegment aggregate in meters with parent-child cut lineage, stock-form cut policies (largest-remainder for spandek sheets, best-fit for rolls), multi-branch holding scopes, and Monday-Saturday Gaji Harian payroll.

Outcome

Eliminated unrecorded offcut waste by tying physical cut execution, Lapor Rusak damage grading, Prime/Clearance/Dead stock valuation, and weekly payroll directly into live P&L, Balance Sheet, and Cash Flow statements.

Results

  • 9-crate Rust DDD modular monolith with persistence-ignorant domain aggregates
  • Meter-exact StockSegment lineage with sheet and roll cut-optimization policies
  • Realized waste and damage-loss accounting across multi-branch warehouse operations