Zeytouni
Group-buy marketplace with escrow, built for Senegal
A Senegalese marketplace built on group buying and trust: the buyer pays a 30% deposit, the balance on delivery, and the money stays in escrow until they confirm the order arrived. In parallel, an AI copilot helps sellers price their products and work out their break-even point.
- 30/70
- deposit / balance
- 4
- mobile-money operators
- 3
- applications
Architect & developer — backend, frontend, superadmin
E-commerce in West Africa runs into a trust problem in both directions. The buyer will not pay a stranger up front; the seller will not ship without a payment guarantee. Cash on delivery solves the buyer's fear and destroys the seller's cash flow. What was needed was a mechanism protecting both sides at once.
The core of the system is a four-state engagement lifecycle: 30% deposit paid, 70% balance paid, delivery, then disbursement. Money passes through escrow and is only released to the seller after the buyer confirms receipt. The seller knows the funds exist, the buyer knows they get them back if nothing arrives.
Payments run through PayDunya and cover the market's four mobile-money operators — Wave, Orange Money, Free Money, Expresso — each with redirect. Two separate inbound webhooks handle the payment IPN and the seller disbursement, because they are two financial flows that fail independently.
The seller copilot does not let generative AI touch the numbers. The pricing, logistics, market-comparison and break-even engines are deterministic PHP; the LLM only explains results and answers in natural language. On margin decisions, you do not let a model do the arithmetic.
- 01
API
Laravel 13 on PostgreSQL. Two separate auth realms: users/sellers under Sanctum, administrators on a distinct Admin model with spatie permissions.
Laravel 13 · Sanctum
- 02
Escrow & payments
PayDunya with all four mobile-money operators. Separate webhooks for payment IPN and seller disbursement.
PayDunya · webhooks
- 03
Seller copilot
Deterministic engines (pricing, logistics, market comparison, break-even) plus a RAG layer for natural-language explanation.
PHP engines · RAG
- 04
Storage
Cloudflare R2 for product media — no egress billing, which matters when the catalogue is highly visual.
Cloudflare R2
- 05
Token economy
Packs, purchases, transactions and redeem codes, plus product boosts and seller ads.
domain models
- 06
Interfaces
A buyer/seller front end and a separate superadmin, both Next.js 16 with shadcn/ui.
Next.js 16
Two auth models, not an `is_admin` flag
On a platform holding money in escrow, a boolean on the users table is a privilege escalation one write away. So administrators live on a separate model and realm, behind their own middleware and permissions. The cost is some duplication; the benefit is that no user-side bug can ever mint an admin.
The arithmetic stays deterministic
It would have been faster to ask the LLM for a recommended price. But a model that is 8% off on a margin costs a real merchant real money, and the error is invisible because the answer still reads plausibly. So the formulas are written and tested in PHP; the AI stays on what it is good at — explaining.
- Four-state group-buy lifecycle with funds held in escrow until delivery is confirmed
- All four Senegalese mobile-money operators via PayDunya
- Seller copilot: recommended pricing, logistics, market comparison and break-even analysis
- Dispute handling, seller withdrawals, coupons, product boosts and ads
- Two isolated auth realms with granular admin permissions