Problem
- Businesses needed one B2B2C platform for POS and CMS: Gulf tax integrations, inventory, loyalty, gift cards, customizable e-menu storefronts and 30+ CMS features.
- Loyalty cards, gift cards and promotions had to live in customers' Apple Wallet and Google Wallet and stay up to date in real time.
My role
- Senior Software Engineer (full stack): designed and built the restaurant POS platform with integrated loyalty, promotions and wallet features, from architecture through production delivery.
- Designed and developed four loyalty features — points, loyalty passes, gift cards and discount coupons — with Apple Wallet and Google Wallet integration and real-time notification support.
- Built a centralized promotional messaging system with Apple Wallet loyalty passes, smart geo-location targeting, and branch-based tracking and visibility.
- Developed a dynamic, block-based page builder and a Flutter mobile app, so businesses create their own menus and storefront pages without developer help and customers can place orders online.
- Spearheaded the OpenRouter AI (DeepSeek) integration for smart menu search and AI-based analysis of restaurant data.
- Improved the overall UI/UX, making features more intuitive and user-friendly.
Architecture & key decisions
- API: NestJS on Fastify, serving REST APIs to the React web apps, the storefronts and the Flutter mobile app.
- Data: Prisma ORM on PostgreSQL, with schema migrations and query optimization for faster data access.
- Background work: webhook-driven, event-based workflows; Redis-backed BullMQ workers process notification and wallet-update jobs asynchronously.
- Access: RBAC with OAuth2/JWT authentication and SSO for multi-role access across the platform.
- Integrations: Apple Wallet and Google Wallet passes, Gulf payment gateways (MyFatoorah, Moyasar), and CRM and leasing platforms to keep customer and business data in sync.
- Frontend: React with Zustand and TanStack Query.
- AI: OpenRouter (DeepSeek) for smart menu search and AI-based analysis of restaurant data.
A simplified view of the retail platforms I architect: POS, loyalty and wallets on a typed NestJS API, with Redis-backed workers and PostgreSQL underneath.
Hover a node to trace its connectionsTap a node to trace its connections
Visitors
Desktop & mobile
App
ReactFlutterUI & state
ZustandTanStack QueryAPI & server
NestJSFastifyNodeREST APIsData
PrismaPostgreSQLRedisExternal services
Apple WalletGoogle WalletMyFatoorahMoyasarOpenRouter
Wallet pass update flow (simplified)
- A webhook event reaches the NestJS API.
- The API adds a wallet-update job to a Redis-backed BullMQ queue.
- A BullMQ worker picks up the job asynchronously.
- The worker updates the Apple Wallet or Google Wallet pass.
- Apple or Google sends a push to the customer’s phone.
- The pass on the phone refreshes with the new data.
Waiting
Active
Completed
Notification and wallet-update jobs run in Redis-backed BullMQ workers, outside the request path. A failed job is retried instead of being lost.
TWLM loyalty passes in Apple & Google Wallet
Real stamp passes from the platform, as customers see them on their phones — the same pass issued to Apple Wallet and Google Wallet, kept up to date by webhooks and BullMQ jobs. Flip to compare.
AI features
Two LLM features run on OpenRouter (DeepSeek) inside the platform: smart menu search on the e-menu storefronts, and AI-based analysis of restaurant data.
Challenges
- Stability after rapid development: refactored a large portion of the codebase to improve structure and maintainability, eliminate side effects caused by rapid development, and make the application more stable.
- API performance: optimized the backend APIs, reducing latency by ~64%.
- Real-time wallet passes and notifications: triggered by webhook flows and processed asynchronously as jobs by Redis-backed BullMQ workers.
- Support load: reworked core user flows based on support data.
Results
- ~70% fewer customer support requests after reworking core flows and the overall UI/UX.
- ~64% lower API latency and better overall system performance.
- 30+ CMS features shipped on one B2B2C platform.
- Four loyalty features — points, loyalty passes, gift cards and discount coupons — with Apple Wallet and Google Wallet passes and real-time updates.
- A more maintainable and stable codebase.





