Case study · 2025 · Live in production

Meganea

A two-country supply-chain platform for a ceramic tile exporter — factory QC in India to customer delivery in Dubai, one traceable pipeline.

Role

Freelance fullstack engineer

Type

Client project · Supply-chain platform

Year

2025

Links

React 19Tailwind CSSNode.jsExpressMongoDBCloudinaryDockerNginx
India operations portal — role-scoped login

India operations portal — role-scoped login

Overview

Meganea imports ceramic tiles manufactured in India and sells them from Dubai. The physical pipeline factory, quality check, pallets, containers, sea freight, warehouse, customer existed only in WhatsApp threads and spreadsheets split across two countries.

I built their whole digital operation: two role-scoped React apps (India operations, Dubai sales) on one Express/MongoDB API, so a tile can be traced from the factory that fired it to the customer who bought it.

49K

Lines of code

3

Apps — India, Dubai, API

19

API resource modules

6

User roles

The problem

Stock in this business isn't one number a tile design can be available in Dubai, booked by a customer, being restocked, sitting in a factory, or on the water. Decisions like 'can I promise this order?' need all five buckets, per design, in real time.

And the two sides work differently: India thinks in purchase orders, QC passes, pallets and containers; Dubai thinks in bookings, LPOs, and deliveries. One interface for both would have served neither.

What I built

One API, two tailored frontends, and a status machine for every physical object in the pipeline:

Procurement & QC

IN

Factories, purchase orders with embedded QC history, a Draft→Manufacturing→QC→Packing status machine

Packing & shipping

IN

Pallets and khatlis as trackable units, loading plans, container lifecycle from Empty to Delivered

Sales & dispatch

DXB

Customer companies, salesman bookings with LPO numbers, partial dispatches with proof images

Restock pipeline

DXB→IN

Dubai raises restock requests that become India purchase orders, with per-item transit tracking

Audit & admin

ALL

Activity logs for every create/update/status change, reconciliation module, role-based access for 6 roles

Reporting

PDF/XLS

Dashboards with charts per country, Excel and PDF exports

Engineering that held it together

Five-bucket stock model

Each tile tracks available / booked / restocking / in-factory / in-transit quantities separately, so both countries see truthful availability instead of one misleading total.

Soft-delete done properly

Archived records keep who/when/why, query hooks hide them everywhere automatically, and partial unique indexes let names be reused after archival — no orphaned constraints.

IDs people can say out loud

PO-00042 style sequential IDs generated atomically from a counter collection, for every entity staff reference on calls between countries.

History on the document

QC results, arrival events, and status changes live as embedded sub-documents with timestamps and actors — every object carries its own audit trail.

Technical challenges

01

Modelling the physical world

A pallet is a real object that moves through factories, containers, and ships. Explicit status machines with guarded transitions (a container can't dispatch before it's loaded) kept the data honest against reality.

02

Two apps, one truth

India and Dubai needed different pages, roles, and vocabulary over the same entities. A shared API with role-scoped routes and two purpose-built React apps beat one bloated interface.

03

Freelance-scale scope

Nineteen resource modules, six roles, and ~49K lines delivered solo — surviving that meant consistent patterns (controller/model/route layering, one soft-delete recipe, one ID generator) applied everywhere.

Outcome

Meganea's India and Dubai teams now run procurement, shipping, and sales on the platform, with every physical movement recorded and auditable. Restock decisions that needed phone calls across a 1.5-hour time difference are now a dashboard glance.

It's the largest system I've shipped solo and the project that taught me that supply-chain software is really a truthfulness problem: the database must never claim something the warehouse can't confirm.

What's next

Dubai warehouse app hardeningContainer ETA trackingAccounting exports