Overview
EasyGift is a B2B2C gift-coupon and corporate-benefits platform in Algeria. Companies load balances, issue digital gift coupons to employees, and employees redeem them in-store at a network of partner merchants via QR/barcode. The platform covers an admin dashboard, an enterprise dashboard for client companies, a distributor dashboard, a merchant point-of-sale dashboard, and a client mobile app backed by a REST API.
The platform was already live when I joined, serving employees of both public and private-sector companies daily across a network of hundreds of partner merchants. I was the sole backend developer on a small cross-functional team — a product manager, a frontend developer, and a team lead — extending and repairing that running system. Real money moving through it meant correctness under concurrency was the main constraint.
Key Engineering Contributions
- Payment concurrency and race conditions: Rebuilt the point-of-sale redemption flow to be atomic under concurrent use, wrapping balance updates in
DB::transaction()withlockForUpdate()on the financial rows. This closed several related issues — balances that could be incremented non-atomically, a store credited before the transaction had actually persisted, and a window where a failed notification after commit could trigger a duplicate charge on retry. - Refund engine: Designed a refund engine for coupon withdrawals: refunds the originating budget first, spills any overflow across other active balances in chronological order, and falls back to last-resort absorption so no funds are lost. Refunds are strictly scoped per entity, so a distributor’s refund can never leak into an enterprise’s budget. Backed by an approval workflow for enterprise and distributor withdrawal requests.
- Database migrations on a live system: Wrote idempotent, transactional, reversible migrations against production data — including a data-repair migration that backfilled missing records for employees belonging to more than one company, without touching any existing rows.
- Multi-entity data modeling: Introduced per-relationship scoping so a single employee can belong to more than one company or distributor, moving lookups from a single foreign key to a pivot table. This fixed broken logins for employees in that situation, across both web and mobile.
- Access control: Audited and corrected role/permission assignments across the admin and enterprise dashboards, and added policy-based authorization across employees, distributors, coupons, and transactions.
Technical Stack
| Component | Technologies |
|---|---|
| Backend | PHP, Laravel |
| Database | MySQL |
| API authentication | Laravel Sanctum |
| Testing | PHPUnit |
| Frontend (dashboards) | Blade |
Live Platform
Explore the platform: easygifte.com
The source code is proprietary and cannot be published. This case study describes my contributions without exposing confidential code, credentials, or company/employee data.