ALL PROJECTS/MAKKENHA

Overview

Makkenha (مكينها) is an online marketplace for car spare parts in Saudi Arabia, focused on Chinese and Korean vehicles where accurate fitment data is hardest to come by. It is Arabic-first (RTL) with full English support, and serves three audiences from one platform: customers shopping the storefront, a small panel of suppliers (up to ten to start) who hold the stock, and Makkenha staff who broker every order in the middle. This is proprietary client work delivered by AmalAxis for a Saudi customer.

Walkthrough

2 short product films — swipe or use the arrows to move between them.

01 / 0230-Second Overview

Problem

Ordinary marketplaces take payment first and reconcile stock later, which for a fragmented parts supply chain produces wrong orders, cancellations and refunds. Makkenha's defining requirement was to invert that: the customer searches, builds a cart and places an order as a request only — no money changes hands until a supplier has confirmed the exact part is physically in stock. That single business rule ripples through the entire system. It demands a stateful order lifecycle with confirmation SLAs, price and cost snapshots taken at the right moments, multi-tenant supplier isolation, a payment layer that only activates once an order is genuinely payable, and an ERP as the inventory source of truth. Layered on top are the realities of the Saudi market: bilingual RTL UX, mobile OTP login, local payment rails (mada, STC Pay, Apple Pay), WhatsApp as a first-class channel, and VIN decoding that works for Chinese makes the free datasets barely cover.

System Design

How It Works

01/04
01

Pay-after-stock-confirmation order lifecycle

The core commerce path: an order starts as a non-payable request and only becomes payable once a supplier confirms the stock, with payment and ERP push following.

  1. 1Customer builds a cart and places an order, which snapshots line prices and creates a non-payable request
  2. 2Staff assign supplier offers per line and issue stock-confirmation requests, each with a 24-hour SLA
  3. 3Suppliers respond per line through the portal; a Celery beat job chases stale confirmations
  4. 4evaluate_order_after_confirmation advances the state machine and the order becomes payable
  5. 5create_payment_for_order issues a Moyasar/Tap/Stripe payment link and notifies the customer
  6. 6The gateway webhook marks the order PAID, firing notifications and pushing the order into Odoo
02

VIN and vehicle-based part search

Turns a VIN or a vehicle selection into an accurate, fitment-filtered set of parts, tuned for Chinese and Korean makes.

  1. 1Customer supplies a VIN or picks make/model/generation/engine
  2. 2Backend decodes the VIN against NHTSA vPIC, falling back to 17vin for Chinese makes, and caches the result
  3. 3Decoded specs resolve to a VehicleModel and PartFitment records filter the catalogue to parts that actually fit
03

Agentic AI parts assistant

A provider-pluggable, tool-calling assistant that answers parts questions using only catalogue facts, backed by embeddings-based retrieval.

  1. 1A customer question enters a tool-calling loop against the configured LLM
  2. 2The agent searches the catalogue, decodes VINs and checks fitment using tools that only return catalogue facts
  3. 3RAG retrieves candidate parts by cosine similarity over stored embeddings and the assistant replies in the customer's language with suggested parts
04

Supplier stock synchronisation via Odoo

Keeps availability in sync with the ERP source of truth while still supporting suppliers who have no ERP.

  1. 1Odoo holds authoritative on-hand quantities for the internal warehouse supplier
  2. 2A management command reads on-hand levels over XML-RPC and mirrors them into that supplier's offers
  3. 3Suppliers without Odoo maintain availability directly through the portal or bulk Excel import

Key Features

  • Pay-after-confirmation order model with a snapshot-driven, explicit order state machine
  • Bilingual Arabic-first / English storefront with full RTL, localised metadata and JSON-LD SEO
  • Passwordless customer OTP login with JWTs held in httpOnly cookies via a BFF proxy
  • Multi-tenant supplier isolation with per-membership permission flags and cost-price protection
  • VIN decoding and vehicle-fitment matching tuned for Chinese and Korean cars
  • Provider-pluggable AI parts assistant with tool-calling and embeddings-based retrieval
  • Multi-gateway payments (mada, STC Pay, Apple Pay, card) through a unified webhook path
  • WhatsApp chatbot plus transactional notifications and Odoo ERP inventory sync

Outcomes

  • Delivered a coherent three-app platform with a snake_case contract that holds verbatim end-to-end, avoiding any wire-level translation layer
  • Encoded the pay-after-confirmation business rule as a mirrored state machine backed by price/cost snapshots and per-line confirmation SLAs, keeping payment gated on genuine payability
  • Built secure customer auth (OTP + httpOnly-cookie JWTs behind a BFF) with multi-tenant supplier scoping that keeps tokens off the client and cost data out of supplier writes
  • Containerised the full multi-service stack (Django/Daphne, PostgreSQL, Redis, Celery, Odoo, Ollama) behind nginx, with pluggable payment, ERP and AI integrations

More work

Mashoor preview
MULTI-VENDOR MARKETPLACE

Mashoor

A bilingual, RTL-ready multi-vendor marketplace for Pakistan's regional specialties

VIEW PROJECT