Almarai Scan & Win — Reusable Consumer Promotion Platform
A reusable, Arabic-first campaign engine powering Almarai's seasonal consumer promotions. Shoppers sign in with a phone number, earn points by uploading receipts or product photos, playing branded mini-games and sharing posts, then redeem them in lucky draws — delivered as six-plus branded editions between 2025 and 2026.
!Problem Statement
Almarai runs frequent seasonal promotions — Ramadan, summer, back-to-school, football, ice cream. Each one needs sign-up, proof of participation, fair points, prize redemption and CRM capture, and building every campaign from scratch was slow.
- Every short-lived campaign started from zero
- Shoppers on phones won't create passwords
- Points must be tied to real purchases or engagement
- Game results and points must resist replay
- Sign-ups needed to reach the CRM with campaign tags
- Arabic-first audience requiring full RTL support
✓The Solution
We built one campaign engine on React and Firebase and delivered it as a series of branded editions — Food Service, Summer, Ramadan, Ice Cream, Football and Safiya — each in its own isolated Firebase project. Campaign flags, translations, prizes and FAQs live as data, and each edition adds its own activity on top of the shared core.
Key Features
Passwordless Sign-In
- Phone-number login via a custom-token Cloud Function
- Server-side Gulf dial-code and length validation
- Optional phone-OTP mode switchable per campaign
- Persistent sessions with Redux Persist
Points, Draws & Vouchers
- Spendable and lifetime points on every user
- Lucky-draw entries priced per gift
- Winner vouchers with codes, serials and email confirmation
- In-app notifications for approvals and awards
Replay-Resistant Mini-Games
- Unity WebGL games embedded in the app
- Single-use, server-issued 64-hex session tokens
- Difficulty rises with the day's play count
- Wins evaluated on the server
Proof of Participation
- Camera capture or upload of receipts and product photos
- In-app review queue for pending submissions
- OCR + LLM points mapping (2025), then automated receipt verification (2026)
Social Feed & Sharing
- Public feed of approved posts with live likes
- Server-rendered Open Graph pages so shared posts preview properly
- Referral tracking on shared links
CRM & Operations
- Automatic Mailchimp audience sync with campaign tags
- Campaign kill-switches stored in Firestore
- Voucher batch tool (QR code / barcode)
- Multi-threaded storage backup tooling
Tech Stack
Frontend
Backend
Services
Architecture
Multi-Tenancy
One shared campaign engine, deployed per campaign into its own isolated Firebase project
Realtime
Firestore listeners for live feed likes and post updates
Data Model
Users → Submissions → Game Sessions → Gifts → Lucky Draw Entries → Vouchers → Public Feed → Notifications
My Responsibilities
- 1Campaign engine architecture on React and Firebase
- 2Passwordless phone login with server-issued tokens
- 3Points ledger, lucky draw and voucher flows
- 4Unity WebGL game integration with server-side sessions
- 5Open Graph share pages for social previews
- 6Mailchimp CRM integration
- 7Arabic/English RTL internationalisation
- 8Operational tooling: review queue, voucher tool, backups
Challenges Overcome
Outcome
Six-plus editions shippedRoadmap
- Consolidate editions into one configurable codebase
- Server-side transactions for all points movements
- Automated receipt verification across every edition
Impact
- ✓At least six campaigns delivered on one reusable engine between early 2025 and mid-2026
- ✓Every sign-up captured straight into Mailchimp with campaign tagging
- ✓Proof-of-purchase checking moved from fully manual review toward AI-assisted auto-approval
- ✓Operational tools support running and closing each campaign