Skip to content
All work

Case study · Multi-store commerce

Mtjri

Multi-store commerce where AI drafts each store’s landing content in the background, and a validator decides whether it is fit to save.

Engineering project

Role
Repository owner
Domain
Store builder, back office, POS and storefront
Stack
Laravel, Inertia and React, queued jobs

The content pipeline

Generating a store’s content is a job, not a request.

  1. Step 01

    Request

    A merchant asks for content.

  2. Step 02

    Queue

    A job is dispatched for the store.

  3. Step 03

    Generate

    The provider manager calls a model.

  4. Step 04

    Validate

    The output is checked against rules.

  5. Step 05

    Save

    Only valid sections are stored.

Engineering decisions

  1. 01

    Jobs, not requests

    Whole-store generation and single-section regeneration run as separate queued jobs.

    GenerateStoreContentJob · RegenerateSectionJob

  2. 02

    A provider manager

    Ollama by default, with an optional OpenAI fallback behind one interface.

    AIProviderManager

  3. 03

    Validate before saving

    Generated landing content must pass a validator before it reaches the store.

    LandingPageContentValidator

  4. 04

    Store-scoped AI records

    AI models belong to a store through a shared trait, so one store never reads another’s drafts.

    BelongsToStore

Inside the product

The platform admin, a store’s back office and its storefront, from a project with demo stores and orders.

Store dashboard
Store dashboard
Storefront
Storefront
Product editor
Product editor
Point of sale
Point of sale
Staff roles and permissions
Staff roles and permissions
Platform admin
Platform admin

What was verified

  • Queued jobs for store and section generation.
  • A provider manager with Ollama and an optional OpenAI fallback.
  • A validator for generated landing content, and store-scoped AI models.
  • Around three dozen test files in the repository (not run for this page).

What I do not claim

  • The source arrived in a single commit, so the history does not show how it was built.
  • It is not deployed and has no merchants.
  • Generation quality has not been measured.

Architecture

Laravel with Inertia and React, queued jobs for AI generation, an AI provider manager over Ollama and OpenAI, and store-scoped models.

Stack

Laravel · Inertia · React · TypeScript · MySQL · Queues · Ollama · OpenAI