Production e-commerce platform for booking Islamic sacrificial services (aqiqah, sadaqah, qurbani), built as five coordinated apps: two bilingual (Arabic RTL / English LTR) Next.js 16 storefronts for Manasik Foundation and Ghadaq Association, a 39-page admin operations cockpit, a unified backend API (~269 route handlers) as the single source of truth, and a dedicated design service that auto-generates personalized certificates per order. One MongoDB Atlas database, one Cloudflare R2 store, Easykash payments with HMAC-verified webhooks, server-side CAPI marketing pixels, and Dockerized VPS deployments driven by self-hosted CI runners.
Manasik Foundation needed two public storefront brands, a certificate design pipeline, and a full internal operations suite — without duplicating backends, databases, or deployments for every brand and tool.
The Solution
One platform of five coordinated apps: two SEO-first storefronts and an admin dashboard served by a single Dockerized Next.js API backed by one MongoDB database and one Cloudflare R2 bucket — plus a dedicated design editor whose server-side render farm produces personalized order certificates and reports them back to the API.
Primary customer storefront for Manasik Foundation: SEO-first SSR with localized product, category, and content pages, geo-detected currency with a country picker, cart and Easykash iframe checkout, order tracking, customer accounts with my-orders and my-designs galleries, referral links with click-id attribution, reels/reviews/audio content, and a full browser + server pixel stack (GTM, Facebook, TikTok, Snapchat, OpenAI) behind region-aware consent.
Second storefront brand running on the same backend and database: identical architecture and feature set as Manasik with its own catalog, branding, content strategy, and domain. Proves true multi-tenancy: N storefronts served by one platform, resolved by site context and viewer country.
Next.jsTypeScriptNext-IntlTailwind CSS
Admin Dashboard
internal
Bilingual (ar/en) operations cockpit spanning 39 pages: daily order execution queue with per-order modals, design approval and regeneration with instant cache-busted refresh, booking-intent triage with per-staff balances due and deep-linkable filters, leaderboards/achievements/weekly praise board, revenue analytics by country/product/currency with live-today and period-over-period insights, a full CMS (products, coupons, countries, FAQs, hero sliders, SEO defaults), Expo push composer, AI admin console, and per-admin page permissions with job roles (sales/accounts/design).
Next.jsReact QuillRechartsNext-IntlTailwind CSS
Backend API
internal
Unified Next.js API (~269 route handlers) running in Docker on a VPS behind Nginx: commerce with per-country pricing, Easykash payments with HMAC-verified webhooks and cash-expiry jobs, design-render orchestration with rescue retries, phone-based customer auth with fraud checks, AI agents, server-side CAPI events for four ad platforms, admin analytics aggregations, Expo push, and 5 scheduled jobs. Pino structured logs with trace IDs, Zod validation, sliding-window rate limiting, and boot-time env validation; load-tested to 500+ rps.
Next.jsNode.jsMongoDBZodDockerNginx
Design App
internal
Canva-like editor and server-side render farm producing the personalized certificates attached to orders: a drag-and-drop canvas with custom fonts, palettes, alignment guides, and undo; renders order data to JPG with @napi-rs/canvas at native speed (no headless browser), uploads versioned assets to Cloudflare R2, and reports URLs back to the backend with automatic retries on failure.
Five coordinated production apps: two bilingual storefronts, a unified backend API, an admin operations cockpit, and a dedicated design-rendering service
Single backend API (~269 route handlers) as the source of truth for products, orders, customers, payments, designs, analytics, and marketing
Easykash payments end-to-end: checkout sessions, HMAC SHA-512 webhook verification, redirect/callback flows, partial-payment guard, and cash-payment expiry jobs
Multi-tenant design: one MongoDB Atlas database and one Cloudflare R2 bucket serving both brands with per-country catalogs and multi-currency pricing (EGP/SAR/QAR/USD/EUR/TRY)
Bilingual Arabic (RTL) and English (LTR) storefronts with next-intl, geo detection, country picker, and SEO-first localized SSR
Automated design pipeline: completed orders trigger certificate rendering, versioned URLs are stored on the order, and a rescue cron retries failures
Server-side marketing pixels for Facebook, TikTok, Snapchat, and OpenAI (CAPI), deduplicated with browser pixels behind consent management
AI assistants for customers and staff with tool-calling over live data, teach-the-agent lessons, and an llm-failures monitoring log
Booking-intent capture turns abandoned checkouts into a sales pipeline with staff follow-up and conversion tracking
Self-managed production ops: Docker Compose + Nginx + Let's Encrypt on a Hetzner VPS, GHCR image retention, and GitHub Actions self-hosted runners with instant rollback by SHA tag
Hardened APIs: Zod validation, sanitize-html, sliding-window rate limiting on auth/checkout, JWT auth, and boot-time env validation that refuses broken deploys
Load-tested to ~500 rps with connection-pool tuning, index-covered sorts, and graceful overload behavior under 4x load
What I Learned
Designing a multi-tenant platform where one backend and one database safely serve multiple branded storefronts
Running production on a self-managed VPS: Docker builds, GHCR, self-hosted GitHub Actions runners, Nginx TLS, and SHA-based rollbacks
Hardening payment flows with HMAC webhook verification, explicit order state transitions, and cash-payment expiry handling
Integrating a design-rendering service with the order lifecycle via callbacks, versioned asset URLs, and failure retries
Implementing server-side CAPI marketing events that deduplicate with browser pixels and respect consent
Production observability: Pino structured logs, per-request trace IDs, log redaction, and daily rotation
MongoDB performance work: compound indexes for sort-covered queries, connection-pool tuning, and allowDiskUse on heavy aggregations
Building AI agents with tool-calling over real business data plus a teach-and-monitor feedback loop
Need Something Like This?
I Build Reliable Products Without the Stress.
From planning and architecture to polished delivery, I can turn your idea into a production-ready web app with intuitive UX, strong performance, and zero unnecessary complexity for you.