Skip to content
Farhad Nazir

Car marketplace and sales CRM

KAYANAK

Arabic-first car marketplace and sales CRM for a Riyadh car business, with installment pricing, car-wash booking and an AI sales assistant.

Role
Lead full-stack developer and DevOps
Platforms
Web, Mobile, Backend & API, Cross-platform
Status
Live
Timeline
2026
Client
KAYANAK Cars (kayank.app)
  • Web application
  • Mobile app
  • E-commerce
  • Business system
KAYANAK website home page in English with a no-down-payment installment hero, a Nissan SUV over the Riyadh skyline and a car search panel showing 1,841 cars available

Overview

KAYANAK (كيانك) is a Riyadh automotive platform that sells cars online with installment financing as the main offer. Customers browse a digital showroom where every car shows its cash price beside an estimated monthly installment, request financing, book an on-demand car wash or submit their own car for sale to partner dealers.

Behind the public site is one API serving three clients: an Arabic-first Next.js website, a Next.js admin dashboard that holds the sales CRM and separate portals for partner dealers and commission-earning marketers, and a Flutter app for customers and marketers. An AI sales assistant answers buyers on WhatsApp by searching live stock, and the same agent backs a web chat and an in-app chat.

I was the lead developer on a small team. I built the first working version in seven days, set up the hosting, deployment and most of the third-party services, and built most of the modules that followed, from the CRM and financing tools to smart search, the affiliate program and the mobile app redesign. A second developer built the first version of the WhatsApp AI agent, the AI blog writer and phone sign-in; I took the WhatsApp agent live and extended it.

Built for: Car buyers and sellers in Riyadh who speak Arabic or English, plus the KAYANAK sales team, managers, partner dealers and marketers who promote cars for commission.

The problem

A new Saudi car business needed one system to sell cars online, capture leads from many channels (website, WhatsApp, TikTok lead forms and an AI assistant), share those leads fairly across a sales team, run a car-wash service and a sell-your-car pipeline for dealers, and pay commission to marketers who bring in buyers.

It had to work in Arabic first, in both right-to-left and left-to-right layouts, and it had to go live within days rather than months.

The solution

I designed a single NestJS and PostgreSQL API as a modular monolith, with in-process events keeping modules such as commissions, CRM and notifications decoupled. The website, the admin dashboard and the Flutter app all talk to the same REST contract, documented with Swagger.

The public site puts an installment price on every car and adds natural-language search, a financing calculator, wash booking and a five-step sell-your-car flow. Staff work from a Kanban CRM with round-robin lead distribution, WhatsApp messaging, quotations and role-based access. The Flutter app mirrors the showroom and adds a voice-enabled AI assistant, a marketer mode with a branded poster maker, and push notifications.

Main features

What the software does day to day, taken from the code.
  • Showroom with installment pricing

    Filter by make, body type, model and price, switch between grid and list views, and see the cash price next to an estimated monthly installment on every card and detail page.

  • Financing calculator and eligibility check

    Customers estimate a no-down-payment plan over one to five years with a final balloon payment, then request financing from the car page. Sales staff get an internal eligibility check that applies several Saudi bank policies and returns a green, yellow or red result.

  • Smart bilingual search

    A deterministic parser normalizes Arabic text, maps Arabic make and model names, corrects typos and pulls out make, model, year, body, fuel, color and price. A query like "family suv under 100k" becomes a filtered list of SUVs under 100,000 SAR.

  • AI sales assistant

    An LLM agent with tool calling searches live stock, shows car cards, takes financing requests and steps back once a salesperson replies. It runs on WhatsApp, and the same agent drives a web chat with history and an in-app chat with voice input.

  • Sales CRM

    An eight-stage Kanban lead board with saved views, notes, tasks, an interaction timeline, WhatsApp templates, CSV exports and Arabic to English message translation. Leads are assigned round-robin and reassigned automatically after 15 minutes without action.

  • Multi-channel lead capture

    Leads arrive in the CRM from website inquiries, sell-car requests, WhatsApp, the AI assistant and TikTok lead forms, and each request triggers a WhatsApp confirmation to the customer.

  • Marketer (affiliate) program

    Referral links with UTM tracking and a 90-day attribution window feed a conversion, commission and payout chain. Marketers apply online, track their sales in a portal and generate branded posters that show the cash price and monthly installment.

  • Sell your car and dealer portal

    Sellers complete a five-step guest flow (car details, condition, photos, contact, inspection appointment) and can track their request. Reviewed cars are shown anonymously to partner dealers, who make offers through their own portal.

  • On-demand car wash booking

    Services priced by vehicle type and city, time slots with capacity limits, a Mapbox location picker with service-area polygons, and a booking state machine with audited overrides.

  • Quotations, content and push notifications

    Staff print A4 quotations for customers, schedule hero slides and banners targeted by make or body type, and reach customers and marketers through Firebase push notifications with an in-app inbox.

Screens from the software itself. Design prototypes and illustrative mockups are labelled as such.

KAYANAK car showroom after the natural-language search "family suv under 100k", interpreted as 236 SUV cars under 100,000 SAR with price and monthly installment on each card
Smart search turns a plain-language query into filters.
KAYANAK car detail page for a Hyundai Elantra with photo gallery, cash price, monthly installment and a calculate financing link
Every car page shows the cash price and an estimated installment.
KAYANAK car financing page with three how-it-works steps and an installment calculator for one to five years with no down payment
The financing calculator on the live website.
KAYANAK admin CRM in Arabic right-to-left layout showing a Kanban board of leads from TikTok, WhatsApp and financing requests, with filters by channel, source and marketer
The sales CRM lead board, shown with sample data.
KAYANAK AI assistant web chat in Arabic answering a request for a family 4x4 under 300,000 SAR with matching car cards and a conversation history sidebar
The AI assistant in the website chat, captured from a development build.
KAYANAK five-step sell your car form with car details, condition, photos, contact and appointment steps and a request summary sidebar
Sellers submit a car in five steps, no account needed.
Branded KAYANAK marketing poster generated for a marketer, with a Hyundai Elantra photo, cash price and estimated monthly installment in Arabic
A poster produced by the marketer poster maker.
KAYANAK Flutter app AI assistant showing car matches for a family SUV under 80,000 SAR with why-this-car reasons, follow-up chips and a voice input button
The app assistant with voice input, captured from a development build with demo images.
KAYANAK website home page on a phone in Arabic right-to-left layout, with a no-down-payment installment hero and the car search panel showing 1,841 cars available
The live website on a phone, in Arabic.
KAYANAK car detail page on a phone for a Hyundai Elantra with cash price, monthly installment, a calculate financing link and a sticky WhatsApp and contact bar
A car page on mobile, with price and installment kept in view.

Development and architecture

The system is four repositories sharing one REST contract: a NestJS 11 API in strict TypeScript, a Next.js 16 public website, a Next.js admin app that also hosts the dealer and marketer portals, and a Flutter app built with Riverpod. Both web apps proxy their API calls to the backend, and the website is revalidated from the API whenever a car changes.

Data lives in PostgreSQL through Prisma, with UUID keys, soft deletes, decimal money, price and commission snapshots, and timestamps stored in UTC and shown in Riyadh time. The pgvector extension holds embeddings for semantic search.

I run production on an Ubuntu VPS behind Nginx and Cloudflare, with media in Cloudflare R2. Deploys are one command: back up the database, run migrations, switch releases and check health, keeping the last three releases for rollback. Docker Compose covers local development.

Modular monolith with events
Controllers stay thin, services own the logic and in-process events decouple commissions, CRM and notifications. I kept it deliberately single-instance and documented the in-memory rate limits and caches as an explicit constraint.
Authentication and access control
Argon2id password hashing, 15-minute access tokens and hashed refresh tokens with family rotation and reuse detection. Ten roles map to permissions, and a test fails if any admin route is missing a role or permission check.
Integrity enforced in the schema
Unique constraints make a second commission for the same conversion impossible, and financial totals are computed from aggregates so they cannot drift from the underlying records.
Guarded AI agent
Building on a teammate's first version, I hardened the agent for production. The LLM layer sits behind a provider abstraction (OpenAI, Anthropic or a fake driver, so tests run without API keys). An output guard rejects any price, percentage or link that did not come from that turn's tool results, and daily caps plus an admin kill switch limit cost and risk.
Semantic search foundation
Each car gets a search document and a 768-dimension Gemini embedding stored in pgvector. A background worker re-embeds changed cars and reuses vectors for identical texts. I built it as the base for hybrid AI search alongside the deterministic parser.
Arabic-first, right-to-left UI
Locale lives in the URL (/ar and /en), layouts use logical CSS properties so they flip cleanly between right-to-left and left-to-right, and each locale has a single serializable dictionary.
Integrations
WhatsApp Business messaging through Hatif, SMS one-time passwords, TikTok lead forms and pixel events, Mapbox maps and geocoding, Firebase Cloud Messaging, Cloudflare R2 storage and SMTP email.

Technology

  • NestJS
  • TypeScript
  • Next.js
  • React
  • PostgreSQL
  • Prisma
  • Flutter
  • Tailwind CSS
  • pgvector
  • Google Gemini
  • WhatsApp API
  • Firebase

Results

To build the first working version
7 daysTo build the first working versionShowroom, wash booking, sell-your-car, dealer leads, affiliates, admin and app
Cars listed in the live showroom
1,841Cars listed in the live showroomPublic listing count, November 2026
To embed every listed car for semantic search
39 sTo embed every listed car for semantic searchAbout USD 0.01 in embedding costs
Pull requests I merged in the first 27 days
140Pull requests I merged in the first 27 days
Estasher store graphic reading 'Engineering experts, verified' beside two phones showing the engineers home screen and an Arabic chat

Engineering consultation marketplace app

Estasher

A bilingual iOS and Android marketplace where clients in Saudi Arabia book consultations and request offers from verified engineers and engineering offices.

  • Mobile app
  • SaaS product
  • Business system
  • Web application
AsaanOptics Marketplace storefront landing page prototype with a dark red hero, 'See better. Shop smarter. From optical shops near you.', and eyewear category tiles
Design prototype

Multi-vendor optical marketplace

AsaanOptics Marketplace

A multi-vendor marketplace for optical shops in Pakistan, with prescription ordering, nearby search and escrow-style checkout, currently in development.

  • Web application
  • E-commerce
  • SaaS product
MerchMind home page with the headline 'The Future in Custom Printing Service', Start Shopping and Generate Designs buttons, a product search bar and category navigation

AI custom merch marketplace

MerchMind

A multi-vendor merch marketplace where shoppers describe a design in words, generate artwork with AI and preview it on products.

  • Web application
  • E-commerce

Have a software idea or a business process that needs a proper system?

Tell me what you are trying to fix. I will reply with honest questions, a practical plan and a realistic estimate.