Back to Projects
F
Engineering

Folde

Product & Full-Stack Developer

Next.jsTypeScriptIndexedDBTanStack QueryPostgreSQL

About the Project

Folde is a multi-tenant operations platform for Nigerian laundries — everything from a single-room shop to a multi-branch chain. It is two applications: an operator dashboard covering point-of-sale, orders, customers, inventory, multi-branch management, and reporting; and a customer-facing site for tenant signup, booking, and order tracking. The product is driven by a detailed PRD I authored, and the frontends are built and in progress ahead of the backend.

What It's Made Of

Operator dashboard

Next.js · IndexedDB · TanStack Query

The surface a laundry is actually run from: point of sale, order intake and status, customer records, inventory, multi-branch management and reporting. It is the piece that must survive a full day without connectivity, so it holds a local database and a write-ahead queue rather than treating the network as available.

Customer site

Next.js · TypeScript

The public side: tenant signup for new laundries, plus booking and order tracking for their customers. Phone number is the identity, validated by OTP, with country-code variants reconciled so one person does not become three records.

Offline sync layer

Write-ahead queue · vector clocks

The design centre of the product. Writes queue locally and replay on reconnect, with vector clocks per device and last-writer-wins on independent fields — but conflicting financial fields are flagged for a human rather than silently overwritten, because two branches editing the same order's money while both offline is a reconciliation problem, not a merge problem.

Backend & tenancy (next phase)

PostgreSQL · row-level security

Specified and not yet built: row-level isolation with a tenant column and Postgres RLS for smaller tenants, schema-per-tenant for enterprise, all money stored as integer kobo, and WhatsApp Business API as the primary outbound channel with SMS as the fallback. The frontends are built ahead of it against the PRD's contract.

Key Highlights

  • Designed the platform around hard local constraints: 24-hour offline operation, WhatsApp as the primary customer channel, and naira-denominated pricing
  • Built the offline layer on IndexedDB with a write-ahead queue and vector clocks for conflict resolution on reconnect
  • Modelled all money as integer kobo to eliminate floating-point rounding errors in financial records
  • Specified phone-number-as-identity with OTP rather than email, matching how the target users actually sign up
  • Planned multi-tenancy on Postgres row-level security, with NDPR compliance as a design requirement rather than an afterthought

Technical Challenges

The design constraint that drove everything was that power and connectivity are unreliable, so an operator has to be able to run a full day's business offline and reconcile later. That rules out the usual optimistic-update pattern — you need real conflict resolution, because two branches may have edited the same order while both were offline. Vector clocks were the honest answer even though they are more work than last-write-wins. The frontends are built; the backend is the next phase.