← All projects
- ERP & CRM
- Shopify stores
Built in
Your orders live between WhatsApp, Shopify and the courier
One tool: the order goes in, the parcel leaves, the margin computes itself.
The problem
A cash-on-delivery brand in Morocco has to confirm every order, create parcels, follow returns and know its real margin, across WhatsApp, Shopify and the courier.
What I built
An ERP on Postgres: the order comes in from the store, gets confirmed on WhatsApp, and becomes a tagged Shopify order and a courier parcel; delivery or return is then followed. Stock, weighted average cost and real margin are recomputed on every movement.
Technical details
- Outbox queue in Postgres (FOR UPDATE SKIP LOCKED) with a fail-safe dry-run mode
- Server-side pricing engine: bundles, tiers, price floors at average cost
- Meta and TikTok server events, hashed and deduplicated by event ID
- Moroccan city and district matching: accent-insensitive aliases, Arabic and Latin names, word-boundary rules
Stack
- Supabase Postgres
- Deno edge functions
- CreaScale API
- WhatsApp Cloud API
- Shopify Admin API
- Meta CAPI
- TikTok Events API
The result
From order to cash, everything runs in one system: 88 server functions, 57 tables, and prices always computed on the server, so no customer can change them.
A similar project in mind?
Tell me about your business and when you need it. You get a proposal by email.
More projects
1 / 27 : Making the creatives for one product takes days