Buyology Trading FZ-LLC (UAE) · Production

Buyology E-Commerce Platform

Multi-surface commerce platform for the UAE — a Next.js storefront, iOS and Android apps, an operations dashboard, and a 39-context Spring Boot core.

Role · Software Developer · Team LeadYear · 2024 — Present
Buyology storefront homepage showing the search bar over a catalogue of 120,000 products, the category navigation for repair, sell, rent, powerbank stations and DIY, and a giveaway campaign banner
Public storefront — buyology.online

Overview

Buyology is a consumer electronics marketplace operating out of the UAE, and the largest system I have worked on. I lead the engineering team building it. It is not one shop front but five applications over a single domain: a public storefront, native iOS and Android apps, an operations dashboard for staff, and a marketing surface — all reading one API.

The commerce core is the part most people would expect: catalogue, variants and specifications, search, cart, checkout, payments, refunds, promotions, reviews and Q&A. What makes the system large is everything the business does that is not simply selling a boxed product. Customers can book a device repair, sell or trade in hardware they already own, rent equipment, order from a powerbank station network, request B2B quotes, or apply to become a supplier. Each of those is its own workflow with its own states, its own pricing, and its own operations screens.

Three of those flows are answered by a language model. A storefront assistant answers product and order questions against the live catalogue; the repair flow estimates a price from photographs of the damage plus a description; the trade-in flow values used hardware the same way. All three run on Anthropic's Claude, and all three are grounded in the live database rather than in a static prompt, so a price change in the dashboard is reflected in what the model says next.

Delivery is where the architecture stops being a single application. Orders leave the commerce core and enter a separate courier service — its own deployment, its own Keycloak-issued identities — which publishes assignment, status and GPS events onto a RabbitMQ topic exchange. The commerce core consumes them from a durable queue with a dead-letter path, and fans the interesting ones out to customers over WebSocket, which is how live courier tracking and customer-to-courier chat work.

The platform serves seven markets. The UAE is the primary storefront; Saudi Arabia, Qatar, Oman, India, Bahrain and Azerbaijan each have their own regional host, with Cloudflare resolving the visitor's country at the edge and Nginx handing it to the application as a trusted header. Product data, currency and delivery pricing are all market-scoped.

At a glance

Markets
UAE · Saudi Arabia · Qatar · Oman · India · Bahrain · Azerbaijan
Languages
English · Arabic · Azerbaijani
Backend
Spring Boot 3.4.2 on Java 17
Datastores
PostgreSQL with 50 Flyway migrations · Elasticsearch
Messaging
RabbitMQ topic exchange with dead-letter queue · STOMP over WebSocket
Authentication
JWT access tokens with HttpOnly refresh cookies · Google, Apple and Facebook OAuth · TOTP MFA
Mobile
React Native on Expo — native iOS and Android projects, released via EAS
AI
Anthropic Claude — storefront assistant, repair estimation, trade-in valuation
Delivery
In-house courier service over RabbitMQ · Quiqup third-party dispatch
CI/CD
GitHub Actions — backend build and deploy, twelve mobile workflows including Maestro end-to-end runs

Surfaces

One API, every screen it reaches.

Next.js · App Router

Web storefront

The primary shop. Server-rendered and region-aware, in English, Arabic and Azerbaijani, with Elasticsearch-backed search, a voice-driven command palette, and live order tracking over STOMP.

React Native · Expo · Swift project

iOS app

A native Xcode target built and released through EAS. Sign in with Apple, Google and Facebook, push notifications, and Live Activities that keep a delivery on the lock screen while the courier is moving.

React Native · Expo · Gradle project

Android app

The same codebase against a native Android project, released through EAS to Google Play, with an end-to-end Maestro suite that runs on a real emulator in CI on every change.

React · Vite

Operations dashboard

What staff actually run the business on: catalogue and stock, order and refund handling, review moderation, courier dispatch, role assignment, and revenue reporting.

Next.js

Marketing site

The public brand surface and the regional landing pages that visitors outside a served market are routed to.

Architecture

How it fits together.

Surfaces

Five applications, one API contract

Web storefrontiOS appAndroid appOps dashboardMarketing site

Edge

Country resolved before the request reaches the app

CloudflareNginx per-region hostsRate limitingTLS / HSTS

Commerce core

Spring Boot modular monolith · 39 bounded contexts

authproductcartorderpaymentrefundreviewb2bsuppliermembershiprepairsellpromopayoutrevenueassistant

Async & realtime

How delivery reaches the customer's screen

RabbitMQ topic exchangeDead-letter queueSTOMP over WebSocketScheduled retry jobs

Data

One relational source of truth, one search index

PostgreSQLFlyway migrationsElasticsearchS3 object storage + CDN

Services & integrations

Separate deployments and third parties

Courier service (Keycloak)Quiqup deliveryPaymob paymentsERPNextAnthropic ClaudeTwilio · SendGridFirebase pushn8n automation

A Spring Boot modular monolith holds the commerce domain: thirty-nine bounded contexts, each a package that owns its own controllers, domain, DTOs, repositories, and services, so a context can be reasoned about — and later extracted — without unpicking the rest. Delivery is already extracted: the courier service runs as its own deployment with Keycloak-issued identities, reached over REST for commands and integrated over a RabbitMQ topic exchange for events, with a dead-letter queue for anything unprocessable. Read-heavy product search is offloaded to Elasticsearch while PostgreSQL stays the single source of truth, with schema changes going through versioned Flyway migrations. Realtime reaches customers over STOMP, authenticated by the JWT carried in the CONNECT frame and verified by HMAC without a database round trip, which is what keeps courier GPS updates cheap enough to broadcast continuously.

Features

Commerce core

  • ▸Catalogue with variants, specifications, and per-market pricing
  • ▸Product data translated across English, Arabic, and Azerbaijani
  • ▸Elasticsearch product search with a voice-driven command palette
  • ▸Cart, checkout, and Paymob payment processing with webhooks
  • ▸Refunds, promo codes, and membership tiers
  • ▸Reviews, ratings, and product Q&A with moderation and content filtering

Beyond retail

  • ▸Device repair booking with AI price estimation from photos
  • ▸Sell and trade-in flows with AI valuation of used hardware
  • ▸Equipment rentals and DIY guides
  • ▸Powerbank station network
  • ▸B2B quote requests and product sourcing requests
  • ▸Supplier onboarding and payouts

Fulfilment & delivery

  • ▸Separate courier service integrated over RabbitMQ
  • ▸Quiqup third-party dispatch with webhooks and retry jobs
  • ▸Live courier GPS tracking pushed to customers over WebSocket
  • ▸Customer-to-courier chat
  • ▸Store pickup, quick delivery, and per-market delivery pricing

AI

  • ▸Buyobot storefront assistant grounded in the live catalogue
  • ▸Repair price estimation from damage photographs
  • ▸Trade-in valuation for used devices
  • ▸Retrieval before generation — one model call per message, not a tool loop
  • ▸Admin-visible transcripts of every assistant conversation

Platform & operations

  • ▸Three-layer RBAC: user type, assigned roles, per-user allow/deny overrides
  • ▸JWT access tokens with refresh rotated through HttpOnly cookies
  • ▸TOTP multi-factor authentication for staff
  • ▸Rate limiting, HTML sanitisation, and audit-friendly structured logging
  • ▸ERPNext product import and order synchronisation
  • ▸n8n workflows for bulk catalogue automation
  • ▸Prometheus metrics and health probes via Actuator

Engineering challenges

Stack

Next.jsReact NativeExpoTypeScriptSpring BootJava 17PostgreSQLElasticsearchRabbitMQWebSocketAnthropic ClaudeDockerNginxCloudflare

Screenshots

Buyology catalogue page listing products with bestseller badges, category and price-range filters in the sidebar, and a sort control
Catalogue — faceted filtering over the search index
Buyology search command palette open over the storefront, showing trending product searches and service shortcuts with keyboard navigation hints and a voice input button
Search — a command palette with text and voice input
Buyology AI page presenting the assistant tools, including the Buyobot shopping assistant, cart recommender, budget optimizer, tech consultant, and accessory compatibility checker
Buyology AI — the assistant surfaces, grounded in live data
The Buyobot chat widget open on the Buyology announcements page, offering quick actions to track an order, handle returns and refunds, find a product, or hand over to a human agent
Buyobot — one Claude call per message, with human handover
Buyology account creation page with a split layout, offering separate personal and business account types alongside an optional giveaway entry
Sign-up — personal and business account types

Questions

About the Buyology E-Commerce Platform.

What is the Buyology e-commerce platform?
Buyology is a consumer electronics marketplace operating from the UAE across seven markets. The platform is five client applications — a Next.js web storefront, native iOS and Android apps, an operations dashboard, and a marketing site — over a single Spring Boot API organised into thirty-nine bounded contexts.
Is there a Buyology app for iOS and Android?
Yes. Both are built from one React Native codebase on Expo, with real native projects underneath — an Xcode project for iOS and a Gradle project for Android — and released through EAS to the App Store and Google Play. Both support Apple, Google and Facebook sign-in, push notifications, live order tracking on a map, and customer-to-courier chat; iOS additionally shows delivery progress as a Live Activity on the lock screen.
How is the backend architected?
As a modular monolith with thirty-nine bounded contexts, each owning its own controllers, domain model, DTOs, repositories and services, plus a separately deployed courier service. The two communicate over REST for commands and a RabbitMQ topic exchange for events, with a durable consumer queue and a dead-letter path. PostgreSQL is the source of truth under versioned Flyway migrations; Elasticsearch serves product search; realtime updates reach clients over STOMP.
Where is AI used in the platform?
In three places, all on Anthropic's Claude and all grounded in live database state rather than a static prompt: Buyobot, the storefront assistant that answers product and order questions; repair price estimation, which reads photographs of the damage alongside the customer's description; and trade-in valuation for used hardware. The assistant retrieves candidate products server-side and then makes a single model call per message, so latency and cost stay bounded on a public endpoint.
How does live delivery tracking work?
The courier service publishes assignment, status and location events to a RabbitMQ topic exchange. The commerce core consumes them from its own durable queue and republishes the customer-facing ones over STOMP, where the web and mobile apps subscribe per order. Clients authenticate by sending their JWT in the WebSocket CONNECT frame, which is verified by HMAC without a database lookup.
How does the platform handle multiple countries and currencies?
Each market has its own regional host. Cloudflare resolves the visitor's country at the edge and Nginx passes it inward as a trusted header, with the origin firewalled to CDN ranges so the header cannot be forged. Catalogue availability, currency, delivery fees and free-shipping thresholds are all scoped per market, and product content is translated across English, Arabic and Azerbaijani.

Next

Buyology E-Commerce Platform was built by Firdovsi Rzaev for Buyology Trading FZ-LLC (UAE).