Skip to main content

Lavin Fashion: a complete commerce system, built from scratch

Store, app, AI shopping assistant, automation and supplier links, for a company our owner is a partner in.

Our relationship with the client: Lavin Fashion is a Saudi limited liability company, legally separate from DataWork, in which DataWork's owner is a partner. We publish this case study with its written consent.

At a glance

Platforms
Web · iOS · Android · Huawei phones
Languages
Arabic first, English in full
Started
July 2026, from scratch
Catalogue channels
Google · Meta · TikTok · Snapchat · Pinterest
AI
A shopping assistant on the site, in the app and on WhatsApp

The challenge

Lavin Fashion wanted a Saudi store for women's and children's fashion that works in Arabic first and in English in full, sells on the web and on phones, and can be run by a small team. Behind a storefront like that sits work nobody sees: a catalogue sourced from suppliers abroad whose prices, stock and shipping costs change every day; marketing channels that each want the data in their own format; orders to follow from payment to delivery; the same questions about size, delivery and returns again and again; and daily content for social media. Done by hand, every product added would add to the mistakes.

What the system had to do

  • A complete right-to-left Arabic shopping experience, and an English edition that is complete rather than partly translated.
  • An iPhone, Android and Huawei app that reads from the same store, with no second system.
  • Written rules for every product's path from supplier to store page, with a price the code calculates and no one types.
  • Prices, stock and delivery windows that stay true whenever the supplier changes them.
  • The same catalogue at the same price on every sales and marketing channel.
  • Answers on the page, or from an assistant that answers only from the store's own sources.
  • Only the decisions that need a person reach the team, and all in one place.

How we built it

Three rules shaped the whole system. First, the store is the single source of truth for products, prices and orders; everything else — the app, the assistant, the channels and the automation — reads from it rather than competing with it. Second, every change in a product's status goes through one gate, so no tool publishes what another has rejected and no two processes write the same field. Third, AI goes where language is the hard part, such as understanding a free-text question or drafting a description, and code goes where the answer has to be exact, such as price, stock and size. Between the app and the store sits a private service layer that keeps the payment keys and caches the catalogue, and underneath everything runs an operations layer that watches itself and fixes its routine faults before it asks anyone.

Inside the app

The Lavin Fashion app home screen in English: a Timeless Elegance banner, women's, kids' and shoes-and-bags tabs, and Lavin Picks
Home: the departments and Lavin Picks.
A product screen in the app: the price, the estimated delivery window, colour and size choices with a price per size, and a What's my size? link
Product: colour, size and delivery window before adding to the cart.
The shopping cart in the app: the item and quantity, a coupon field, the totals and a Continue to payment button
Cart: the total is clear before payment.

How the system fits together

  1. What the shopper sees

    • The web store in Arabic and English
    • iOS, Android and Huawei apps
    • Dana on the site, in the app and on WhatsApp
    • Email, push and order updates
  2. Service layer

    • A private API for the app and the assistant
    • A cached catalogue
    • Cart and checkout through the store
    • Cryptographically signed sign-in
    • Order notifications
  3. The store: one source of truth

    • WooCommerce with custom business logic
    • One publishing gate and a product lifecycle
    • Search that understands Arabic
    • Saudi national address at checkout
    • Sets bought in one go
  4. Automation and AI

    • Scheduled workflows
    • A daily video and card worker
    • An assistant with read-only tools
    • An operations desk with one alert per problem
  5. Outside connections

    • Sourcing platforms
    • Payment gateway and pay-later
    • Advertising and marketing channels
    • WhatsApp, email and push
  6. Infrastructure

    • An edge network that protects and speeds up every request
    • Cloud servers in Riyadh
    • Containers for the services and automation
    • Storage for images and encrypted backups

What we built

An Arabic-first storefront

A right-to-left store with a complete English edition, search that understands Arabic, an expected delivery window on every product page, and the Saudi national address checked at checkout. Coordinated sets, including mother-and-daughter outfits, go into the cart whole at the set price, with the saving worked out from the current prices of the pieces.

A native Flutter app

One codebase that ships builds for iPhone, Android, and Huawei phones that run without Google services. Browsing and filtered search, cart and checkout, orders in detail, wishlist and reviews, fingerprint or Face ID sign-in, and account deletion inside the app. The cart and catalogue are kept on the device, and app orders never reach any advertising platform.

Dana, the shopping assistant

An "Ask Lavin" button on the site and in the app, and the same assistant on WhatsApp. It understands free-text questions in Arabic, shows real products from the catalogue, answers delivery, returns and payment questions from the store's own policy pages, and searches by photo: a shopper sends a picture of a piece and gets the closest matches in the store. It says it is an automated assistant, and every reply offers a handover to WhatsApp.

Ready questions under the price

"What's my size?", "When will it arrive?" and "Returns and payment" sit under every price. Size is worked out in code from that garment's own measurement chart, with no language model involved, because the answer has to be right rather than persuasive. A "don't buy it if…" line tells shoppers plainly who the piece will not suit.

Direct supplier connections

Products come from two international sourcing platforms through their APIs: candidates are imported, then price, stock and shipping cost are synced on a schedule, and the parcel is tracked through the supplier's logistics network until the tracking message reaches the shopper. A piece that sells out stays visible with its true status instead of disappearing.

One publishing gate

A product's status used to be written from more than one place, so we brought it down to one eligibility function and one state controller: written checks on images, duplicates, suitability and intellectual property, a daily publishing cap, and a read copy of the store's data refreshed every minute.

One catalogue, every channel

A feed built from the store every hour reaches Google Merchant Center through its API, and Meta, TikTok, Snapchat and Pinterest through their own feeds, with a feed in the shopping format used by AI assistants derived from it. The same product carries the same price wherever it appears.

Daily content without the daily grind

Arabic titles and descriptions drafted with AI under a written style guide and claim rules. A video worker builds a short vertical film and product cards every day, with a generated voice-over, and posts them to Facebook and Instagram.

A single operations desk

Every alert in the system goes through one door to the team's channel: one card per problem, updated when it is resolved, each saying what to do or what was done, alert levels that respect quiet hours, and one morning digest. We built it after measuring the old alerts and finding that most of them were false alarms.

Email and push, by consent

Emails in right-to-left Arabic templates, order-status notifications in the app, WhatsApp updates only for shoppers who opted in at checkout, and offers that reach only those who asked for them, with quiet hours and a weekly cap.

The automation, step by step

From supplier to product page

  1. A candidate product is imported from the sourcing platform as a draft, never as published.
  2. Its images move to the store's own image storage.
  3. Automated checks on delivery time, shipping cost, brand identity and intellectual property.
  4. A review of what the title means and of the photos before any decision.
  5. An Arabic title and description under the style guide, filed in the most specific category and its parents.
  6. A price set by a formula in code; no price is ever typed by hand.
  7. The single publishing gate accepts or rejects, under a daily cap.If rejected: Rejected, never published
  8. If accepted: The product page goes live

Safeguard: Intellectual-property and suitability calls stay with a person, and the gate rejects anything that breaks the store's written rules.

An honest catalogue, every day

  1. Price, stock and shipping cost synced from the supplier on a schedule.
  2. A sold-out piece stays visible as out of stock, on the page and in its structured data.
  3. A product that vanishes at the supplier is confirmed gone over two days before it is archived.
  4. Sets repair themselves when one of their pieces changes.
  5. Image dimensions are corrected automatically every few minutes.

Safeguard: Archiving comes before any deletion, under a daily cap, so a passing glitch at the supplier never costs a product.

The order journey

  1. The national address is required, and its format is checked in both the store and the service layer.
  2. An unpaid order is cancelled automatically after a short hold.
  3. Payment is confirmed only by the gateway's own notification, never by the shopper's screen.
  4. The team is alerted, the shopper gets an app notification, and a WhatsApp update if they opted in.
  5. Tracking is pulled from the supplier, with a tracking message when the parcel ships.
  6. A review request follows delivery, and only verified buyers can review.

Safeguard: A watch on late orders, and a daily check for any order that was paid and then cancelled.

From catalogue to sales channels

  1. One feed is built from the store and cached every hour.
  2. Google Merchant Center receives it through its API.
  3. Meta fetches it daily, and it is pushed to TikTok daily.
  4. Snapchat and Pinterest get export feeds of their own.
  5. A feed in the AI-assistant shopping format is derived from the same source.
  6. Search engines are told which pages changed.

Safeguard: A feed watcher samples the images and holds back anything awaiting review or carrying a fit warning.

Daily content

  1. The automation asks the store for the next product that is ready to post.
  2. The video worker builds a short vertical film and a product card.
  3. An AI-generated voice-over is added.
  4. It is posted to Facebook and Instagram.
  5. The post is confirmed, or the product goes back in the queue if it stalled.

Safeguard: A guard that stops the same product being posted twice.

How Dana answers

  1. The question is screened before it reaches the model, and manipulation attempts are turned away.
  2. The model works with tools that read from the store and has none that can write to it.
  3. It must answer in a fixed format.
  4. The reply is checked before it leaves: every number must appear in the source, and links may point only to the store.
  5. A reply that fails the check is replaced with a safe answer, never patched.

Safeguard: A daily cost ledger switches the assistant off if it goes over budget.

What the system connects to

Lavin FashionThe store, the one source of data

Payments

  • mada
  • Visa and Mastercard
  • Apple Pay
  • Tabby pay-later
  • Confirmed only by the gateway's notification

Sourcing and shipping

  • Two international sourcing platforms through their APIs
  • Price, stock and shipping-cost sync
  • Tracking from the supplier's network
  • A tracking link in the shipping message

Advertising and channels

  • Google Merchant Center and Google Ads
  • Meta Pixel and Conversions API
  • TikTok
  • Snapchat
  • Pinterest
  • X

Messaging

  • WhatsApp Business
  • Klaviyo email in Arabic templates
  • Firebase push notifications
  • Telegram for the operations team

Measurement and monitoring

  • Google Analytics 4 in consent mode
  • Cloudflare analytics
  • Error tracking on our own servers
  • A synthetic shopper testing checkout every day

AI

  • Language models through an AI gateway at the edge
  • Search by photo
  • Generated voice-overs for films
  • Automated image screening

Compliance

  • Saudi national address at checkout
  • Consent recorded before any tracking
  • Account deletion inside the app
  • An intellectual-property guard

Infrastructure and operations

  • Cloudflare: protection, caching, Workers and R2
  • Cloud servers in Riyadh
  • Docker containers
  • GitHub Actions for builds and tests

From the live store

How the system stays dependable

CI that stops mistakes early

Every change passes automated checks before it is merged: a secrets scan across the whole history, a syntax check of every PHP file that ships, app code analysed with zero warnings, Android and iOS builds scanned for any embedded key, and a check that every test is actually registered.

Tests at every layer

Tests for the store, the service layer and the app; a synthetic shopper that walks the purchase journey every day on the web and through the API; an Android emulator test of fingerprint sign-in; and an end-to-end test of account deletion.

Deploys that roll themselves back

A deploy checks the files, swaps them in one move, then verifies; if the check fails, it goes back to the previous version with no one stepping in. The daily plugin updates go through the same mechanism.

Backups that are restored on purpose

Encrypted backups of the database and the servers in more than one place, a locked store that prevents deletion for a set period, and a scheduled restore drill that proves the backup actually works.

Secure by design

The servers are never exposed to the internet directly; every request comes through the edge network with a verifying certificate. The merchant key never leaves the service layer, the app talks to nothing else, and the logs are free of personal data, with a test that proves it.

Performance measured, not assumed

Performance budgets for the store's pages checked in CI, page caching at the edge, images served from cloud storage behind the same network, and a full health check of the whole system in one command.

How it was built

  1. July 2026The first line of code: the Arabic store theme and its policies, then the service and automation layer in containers, the app project with its three builds, and continuous integration.
  2. August–September 2026Edge-network settings under version control, TikTok and Snapchat feeds, marketing email, the daily video pipeline, and automatic database copies to cloud storage.
  3. October 2026The single product-lifecycle gate, the complete English edition, the shopping-assistant API, performance budgets, then the move of the store to cloud servers in Riyadh.
  4. November 2026Dana on WhatsApp, the unified operations desk, and a second sourcing platform.

What changed

  • A live store at lavin.fashion in Arabic and English, run by written rules rather than by what someone remembers.
  • An app for iPhone, Android and Huawei built on the same catalogue, with no second system to maintain.
  • Products travel from supplier to page, and prices and stock follow the supplier, with no copying by hand.
  • Every sales and marketing channel is fed from one source, so prices do not drift between them.
  • Size, delivery and returns are answered on the page, and the assistant answers only from the store's own sources.
  • The team sees the exceptions and the decisions in one channel, and routine faults are fixed automatically.

Status on 4 November 2026: the store and the shopping assistant are live at lavin.fashion in Arabic and English.

Technology

  • WordPress and WooCommerce
  • PHP
  • Flutter and Dart
  • TypeScript and Node.js
  • Docker
  • n8n
  • Redis
  • PostgreSQL and MariaDB
  • Python and ffmpeg
  • Cloudflare Workers and R2
  • GitHub Actions
  • Large language models with read-only tools

The services and solutions behind this work

Frequently asked questions

How long did the system take to build?

Work began in July 2026, and by November of the same year the store in Arabic and English and the shopping assistant were live, with development continuing. The “How it was built” section above shows what was added each month.

Can you connect my store to my existing suppliers and channels?

Yes, wherever each party offers an API or a data feed. For Lavin Fashion we connected two sourcing platforms, a payment gateway and a pay-later service, Google, Meta, TikTok, Snapchat and Pinterest, and WhatsApp, email and push. We start by checking what each party actually allows before we promise anything.

Does the AI set prices or act on orders?

No. The assistant reads prices and stock from the store at the moment it is asked, and its tools are read-only: it cannot cancel an order, change a price or issue a refund. Prices come from a formula in code, and sizes are calculated in code, not by the model.

Could you build something similar for my store?

Yes, and you do not have to take all of it at once. We usually start with whatever eats most of your team’s time today, such as product updates or repeat customer questions, and add the next piece from there. Scope and timing depend on the size of your catalogue and the channels you sell on.

Why are there no sales or growth figures?

Because they are another company’s commercial data, and because we do not publish a number we cannot source. What you can check for yourself is the live store at lavin.fashion.

Have an idea, or a system that needs work?

Start with a short session to understand where you stand and what the next step should be. If the scope is clear, a written proposal follows.