[ Case Study · Laravel 13 · Filament 4 ]

GoldERP

Gold, stones, workers and cheques in one ledger, rebuilt for 2026: a jewellery-workshop ERP in production since 2020, rebuilt as GoldERP 26 on Laravel 13 and Filament 4 with a harness that checks the new balances against the old system.

Client
In-house product
Engagement
Legacy rebuild + product engineering
Disciplines
ERP · Laravel · Filament · Migration
Year
2026
GoldERP 26 reports dashboard with revenue, balances, gold and silver flow charts and cheques due soon — light modeGoldERP 26 reports dashboard with revenue, balances, gold and silver flow charts and cheques due soon — dark mode
01 · Overview

A jewellery workshop's whole business, weighed to the gram.

A gold and jewellery workshop does not run like a shop. Raw gold, silver and stones are bought by weight and by shape and size. Metal is issued to workers who turn it into rings, chains and sets, and every gram that comes back has to be reconciled against what went out, minus the loss at the bench and in polishing. Finished pieces are sold to customers who often pay in three ways at once: some cash, a post-dated cheque or two, and the rest on account. Every one of those steps produces paper, and in Morocco that paper has to be printable in French or Arabic, in two copies, on the spot. GoldERP is the system that keeps all of it in one ledger.

The product has a history. Its predecessor, MiniERP 3, branded "GOLD ERP 3" in its demo, is MrZaKaRiA's product and has run a workshop's books in production since 2020, on CodeIgniter 3 and AdminLTE. It works, but the stack around it has aged out: CodeIgniter 3 reached end of life in 2022, its PDF library only runs on PHP 7, totals were computed by filtering rows on the name of the controller that wrote them, stone recipes were stored as serialised text, and backups were whole SQL dumps pushed to Dropbox. Any replacement had to produce the same balances as the old system, to the gram and to the dirham, before anyone could switch.

GoldERP 26 is that replacement: a ground-up rebuild on Laravel 13 and Filament 4, developed side by side with the legacy app in one repository and tagged phase by phase, 28 phases in all. It has 15 workflow screens for gold, silver, stones, products and payouts, 11 bookmarkable history pages, 5 reports including a new Profit & Loss, an analytics dashboard with live gold and silver spot prices, per-customer profiles and statements, and two-copy invoices and receipts in French, Arabic or English. A legacy importer with a parity harness re-runs the old formulas against the new ones in CI, and a parity matrix accounts for every legacy controller method, view and script behaviour. Commercial builds are locked to a licensed domain and term with Ed25519 signatures. The rebuild is feature-complete against the legacy system; the production cutover is the step still ahead.

By the numbers
15

Workflow screens for metal, stones, products and payouts

90 · 0

Legacy behaviours matched · missing, per the parity matrix

41

Test files run in CI on every push

28

Tagged rebuild phases, skeleton to licensing

02 · Architecture & Design

Rebuilding a system that cannot be wrong by a single gram.

The hard part of replacing a working ERP is not the new screens. It is proving that the new system agrees with the old one about every balance a business owner already trusts. Every decision below serves that goal, or the one right after it: making the new system easier to run, safer and harder to misuse than the one it replaces.

01

Freeze and harden the legacy app first

Before any new code, the legacy app was imported as shipped and tagged, then patched and tagged again. That base release fixed SQL injection and CSRF, migrated unsalted password hashes to password_hash, added a login lockout, closed a path-traversal hole and moved CodeIgniter from 3.1.7 to 3.1.13, so the system in production stays safe while its replacement is built.

02

Side by side, one tag per phase

Old and new live in one monorepo. The rebuild advanced in 28 tagged phases, from the application skeleton to licensing, so every step can be checked out, compared with the legacy code next to it and rolled back on its own.

03

Business rules in workflow actions, not in screens

Thirteen workflow action classes hold every operation, from buying gold to reversing a cheque payout. The Filament pages, the demo seeder and the test suite all call the same actions, so the rule that runs in a test is exactly the rule that runs at the counter.

04

Types instead of controller names

The legacy app tagged each stock or payment row with the name of the controller that wrote it, and computed totals by filtering on those names. GoldERP 26 replaces that with seven enums for stock and payment transaction types, and turns serialised stone recipes into a proper materials pivot table that can be queried and validated.

05

A parity harness, not a promise

Two artisan commands, legacy:import and legacy:parity, plus an admin page, parse a legacy SQL dump, import it and compare the new balances with a port of the legacy formulas. A parity test runs this against a synthetic dump in CI, and a parity matrix records 90 legacy behaviours done, 2 partial (since fixed), 0 missing and 24 deliberately dropped.

06

Two-copy prints in three languages

Invoices, worker receipts and payment receipts print two-up, one copy for the customer and one for the file, plus a customer account statement. Each customer has an invoice language, French, Arabic or English, and every print route checks the user's permission before it renders.

07

Domain-locked commercial builds

A build script signs each licence with a throwaway Ed25519 key and ships only the public key, so a delivered copy can verify a licence but never mint one. Two independent runtime checks refuse to run on another domain, after the licence term, or with an edited or deleted licence file. It is deterrence, not unbreakable DRM, and we describe it that way.

08

Roles, audit and nightly backups

Spatie roles and ten policies replace the legacy permission columns, an activity log records who changed what, and a security-headers middleware covers every response. Nightly backups run, clean up and are monitored on a schedule, replacing the old full-database dump to Dropbox.

09

Live metal prices with a manual fallback

A spot-price service reads the gold and silver price in US dollars and converts it to dirhams with a live exchange rate. When either source is unreachable, or the shop prefers its own rate, a manual price in Settings takes over.

10

A calm Filament panel, light or dark

The interface is Filament 4 with an amber accent that nods to the product's name, light, dark and follow-system modes, and a sidebar in fixed order: Operations, Catalog, Analytics, Operations history, Administration. Operations stay grouped the way the workshop works them, on a modern, responsive panel.

11

A demo shop driven by the real workflows

A deterministic seeder generates four months of activity, customers, sales, cheques and worker production, by calling the same workflow actions the panel uses. Demos and screenshots never touch client data, and the demo itself exercises the business rules end to end.

12

Tested on every push

PHPUnit 12 runs on an in-memory SQLite database in GitHub Actions on every push and pull request: 41 test files and 178 test methods, including import parity, print permissions, licence enforcement and the backup schedule. The changelog reports 197 tests green at the final phase.

03 · Everything inside

From raw gold at the counter to a two-copy invoice in Arabic.

Every operation, report, print and safeguard in GoldERP 26, grouped the way the panel itself is organised. Hover any item for what it does.

Metal operations06
  • Gold buy
  • Gold sell
  • Gold out
  • Silver buy
  • Silver sell
  • Silver out
Stones, products & workers06
  • Stone buy
  • Stone out
  • Product make
  • Product sell
  • Material in
  • Lost restore
Payments & payouts06
  • Split payments
  • Worker payout
  • Cheque payout
  • Debit payout
  • Reverse cheque payout
  • Payment receipts
History & reports08
  • 11 history pages
  • Store report
  • Stones report
  • Cheques report
  • Debit aging
  • Profit & loss
  • Reports dashboard
  • Global search
Dashboard widgets09
  • Balance overview
  • Today's till
  • Shop revenue
  • Gold flow chart
  • Silver flow chart
  • Cheques due soon
  • Low stock
  • Metal spot prices
  • Customer lookup
Catalogue & people10
  • Materials
  • Products
  • Stones
  • Shapes
  • Sizes
  • Stocks
  • People
  • Person profile
  • Payments
  • Settings
Prints & documents06
  • Two-up invoice
  • Worker receipt
  • Payment receipt
  • Customer statement
  • FR / AR / EN per customer
  • Permission-gated prints
Migration & parity07
  • legacy:import
  • legacy:parity
  • Import admin page
  • SQL dump parser
  • Legacy formula port
  • Parity test in CI
  • Parity matrix
Security & operations09
  • Roles & permissions
  • 10 policies
  • Activity log
  • Security headers
  • Nightly backups
  • Backup monitor
  • Domain-locked builds
  • Ed25519 signatures
  • Fail-closed licence check
Engineering08
  • Laravel 13
  • Filament 4 + Livewire 3
  • Tailwind 4 + Vite 8
  • 12 models, 21 migrations
  • 13 workflow actions
  • PHPUnit 12 in CI
  • Make targets
  • Demo seeder

75 operations, reports, prints and safeguards in one Laravel 13 + Filament 4 panel, checked against the system it replaces.

04 · How it competes

Built for the bench, not adapted from a shop till.

Jewellers usually run on spreadsheets, a generic small-business ERP or a retail point-of-sale package. None of them follows metal from the scale to the worker and back. GoldERP's edge is a workflow written for gold workshops, now on a modern, tested stack.

vs. MiniERP 3, its own predecessor
The same workflows on a supported framework, with silver, stone costs, a P&L, live metal prices, roles, an audit log, nightly backups and a test suite the old app never had, and a parity check proving the balances still agree.
vs. spreadsheets
One ledger instead of several workbooks, with every gram issued to a worker tracked back, cheques flagged before they fall due, and invoices printed in two copies in the customer's language.
vs. generic small-business ERPs
Generic stock modules count units, not grams and stone sizes. GoldERP tracks metal by weight, stones by shape and size, and worker production with bench and polishing loss out of the box.
vs. jewellery POS packages
A point of sale stops at the counter. GoldERP also covers the workshop behind it, with worker issue and return, payouts and split cash, cheque and credit sales, self-hosted on the shop's own domain.
Feature-by-feature
GoldERP 26MiniERP 3SpreadsheetsGeneric ERPJewellery POS
Metal tracked by weight, stones by shape and size✓✓○○○
Worker issue and return with loss tracking✓✓○——
Silver workflows✓—○○○
One sale split across cash, cheque and credit✓✓○○○
Two-copy invoices in FR / AR / EN✓○—○○
Profit & loss with stone costs✓—○○○
Live gold and silver prices in dirhams✓———○
Roles, policies and an audit log✓○—✓○
Scheduled, monitored backups✓○—○○
Automated test suite in CI✓——○○
Supported, current framework✓—○✓○
Self-hosted on the shop's own domain✓✓○○○
✓ included  ·  ○ partial / add-on / manual  ·  — not available
05 · Outcome

Feature-complete against the legacy system, with the cutover still ahead.

GoldERP 26 covers everything MiniERP 3 does and more. Its parity matrix records 90 legacy behaviours done, 0 missing and 24 deliberately dropped, such as the Dropbox sync and the old asset proxy, and every gap it ranked is marked fixed. The new system adds silver workflows, stone purchase costs and a Profit & Loss report, shape and size administration, live metal prices, a till view and global search, proper roles and an audit log, nightly backups and domain-locked commercial builds. The repository holds 41 test files and 178 test methods, CI runs the full suite on every push, and the changelog reports 197 tests green at the final phase.

We are careful about what is not done yet. MiniERP 3 is still the production system. The definition of done for the switch is written down: a green parity report on a fresh production dump, browser tests across all twelve workflows and four prints, and a cutover rehearsed on staging. None of those has been recorded yet, so we describe GoldERP 26 as a finished rebuild awaiting cutover, not a completed migration, and we make no client, revenue or usage claims for it. What it already shows is how RAIN replaces a system a business depends on: harden the old one, rebuild beside it, and prove agreement before anyone has to trust the new numbers.

GoldERP — FAQ

GoldERP is a back-office ERP for gold and jewellery workshops. It tracks raw gold, silver and stones from purchase, through the workers who make products, to sale, with payments split across cash, cheques and customer credit and two-copy invoices in French, Arabic or English.

MiniERP 3 is the original CodeIgniter 3 and AdminLTE application, in production since 2020. GoldERP 26 is its rebuild on Laravel 13 and Filament 4, with the same workflows plus silver, stone costs, a Profit & Loss report, live metal prices, roles, an audit log, nightly backups and an automated test suite.

A legacy importer and a parity command re-run the old balance formulas against the new ones, and a parity test does this against a synthetic dump on every push. A parity matrix records 90 legacy behaviours done, 0 missing and 24 deliberately dropped.

Not yet. The rebuild is feature-complete against the legacy system, but MiniERP 3 is still the production system. The cutover is planned after a parity run on a fresh production dump, browser tests and a staging rehearsal.

Each commercial build is locked to a licensed domain and term. Licences are signed with Ed25519 and only the public key ships, so a delivered copy can verify a licence but not create one, and an edited or deleted licence file stops the app.

Yes. RAIN replaces ageing business software by hardening the old system, rebuilding beside it and proving the numbers agree before cutover. Custom platforms typically take 8 to 16 weeks, and fixed-scope projects start at $10,000.

Want a product like this?

Custom projects from $10,000, monthly plans from $7,500. Kickoff within 3–5 business days.