Back to home
Vendy logo

Vendy

Pata mtu wa kazi — a Nairobi marketplace for verified local vendors: plumbers, electricians, cleaners and phone, laptop and appliance repair. Customers find someone near them, see real prices and completed jobs, book and chat — and a vendor's phone number stays hidden, in the listing and inside the chat, until the booking is confirmed.

Visit live site

Demo

Architecture

Customer Site

Next.js 16React 19TypeScript 5.9 (strict)Tailwind CSS 4TanStack Query 5openapi-typescriptopenapi-fetchLeaflet / OpenStreetMapVitest
–
Next.js 16 App Router site with search as the hero: six service categories with live vendor counts, the busiest vendors in your area, how-it-works, safety rules, FAQ and support.
–
An area picker for a Nairobi neighbourhood or device location, remembered in the browser; typo-tolerant service matching, filters for distance, price and jobs completed, and sorting by distance, jobs, rating or price.
–
Vendor cards lead with jobs completed rather than stars, because it predicts a good job better — and every listed vendor has passed a manual ID check.
–
Booking flow: choose a price or ask for a quote, describe the job, pick today, tomorrow or a date and slot (or flag an emergency), drop a pin on a Leaflet map, and submit with an idempotency key so a retry never double-books.
–
API types generated from the backend's OpenAPI spec with openapi-typescript, so every request and response is checked against the live contract; TanStack Query handles server state.
–
Public pages are server-rendered and revalidated on a timer while anything personal is fetched in the browser; sessions live in httpOnly cookies scoped to the API path, and the access token is held in memory only for the chat socket.

Vendor App & Operations Console

Vite 5React 19React Router 7TypeScriptTailwind CSS 4openapi-fetchVitest
–
A vendor app designed for a phone in full sun — ink ground, 16px minimum text, 52px tap targets — covering job requests, active jobs, price changes, finishing and cancelling, portfolio, prices, service area, earnings, reviews and chat.
–
Six-step vendor onboarding ending in send-for-review, with the verification state surfaced on the home screen until an admin decides.
–
An operations console built desktop-first at 1440px with dense 40px tables and colour used only as status: verification queue with a split-view document viewer, vendor management, suspension behind a typed confirmation, bookings and stale requests, chat moderation with context, flags, reports, reviews, catalogue, pilot stats and the admin audit log.
–
Keyboard-driven review — R opens the oldest vendor waiting, J jumps to the next in the queue — because the console is a job to get through quickly, not a dashboard to browse.
–
Both apps proxy their own path prefix to their API so the backend's path-scoped session cookies work without CORS.

Backend, Chat & Workers

FastAPIPython 3.12Pydantic 2SQLAlchemy 2 (async)asyncpgGeoAlchemy2PostgreSQL 16 + PostGISAlembicRedisRabbitMQ (aio-pika)WebSocketsnginx
–
A modular monolith rather than microservices: four FastAPI apps behind one nginx — /admin, /customer, /vendor and /chat — plus one worker process per RabbitMQ queue and a scheduler, all from one image and one database.
–
The chat gateway runs as its own process because WebSocket connections are long-lived — a few hundred idle sockets sharing the HTTP worker pool would starve the API. Fanout goes over Redis pub/sub, with presence, typing indicators and unread counts.
–
The booking state machine is the single source of truth for the lifecycle and for the contact-reveal rule, and is tested exhaustively alongside the reveal conditions.
–
Geo search over PostgreSQL 16 with PostGIS and GeoAlchemy2 — distance ranking from a neighbourhood or device location, with cached vendor cards and search results.
–
Redis carries one-time codes and their send throttles, sliding-window rate limits, a refresh-token denylist, the catalogue tree, idempotency keys and chat presence.
–
RabbitMQ workers for email, media processing, chat moderation and notifications, each with a dead-letter queue, plus a scheduler for timed sweeps such as stale requests.
–
Domain modules talk to each other through service functions and never import another module's SQLAlchemy models, keeping the option of splitting one out later without forcing it now.

Trust, Safety & Media

Contact-leak moderationCloudflare R2 (S3 API)Pillow (WebP, EXIF strip)Signed URLspywebpushaiosmtplibSMSKiswahili / English i18n
–
Contact-leak moderation is the feature that makes masking real: phone numbers and emails typed into chat are detected and hidden until the booking is confirmed, with a notice explaining why. Without it the rule is bypassed in message one.
–
Vendor verification runs on ID documents held in a private bucket with restricted access and an audit entry on every admin decision, because approving a vendor means handling regulated identity data.
–
Reviews can only come from a completed booking, so the ratings shown in search cannot be manufactured.
–
Two R2 buckets over the S3 API: a public one for portfolio photos only, and a private one for ID documents, booking photos and avatars, served through short-lived signed links.
–
Uploads are resized to WebP with Pillow and stripped of EXIF — portfolio photos arrive from phones at 6MB with GPS coordinates embedded.
–
Notifications fan out across in-app, email and Web Push, with SMS for the events a vendor cannot afford to miss; disputes and safety reports are recorded from the first job that goes wrong.
–
Kiswahili and English from the start, since retrofitting i18n into a shipped UI is miserable.

Deployment

VercelDockerdocker-composeGitLab CI/CDnginxCloudflare R2MinIO + Mailpit (dev)pytestVitest
–
The customer site deploys to Vercel as a Next.js app; the vendor app and operations console deploy as static Vite builds, each rewriting its own path prefix to the backend so session cookies stay same-origin.
–
The backend ships as one Docker image with a compose stack — Postgres with PostGIS, Redis, RabbitMQ, the four APIs, the workers, the scheduler and nginx — delivered through GitLab CI/CD.
–
Local development needs no cloud account: MinIO stands in for R2, Mailpit for SMTP, and the unit suite runs with no services up at all.
–
Health and readiness are split per portal — /health answers whether the process is up, /ready whether Postgres, Redis and RabbitMQ are actually reachable.
–
The backend and the two internal apps live in private repositories, so only the live customer site is linked.

Screenshots

Vendy screenshot
Vendy screenshot
Vendy screenshot
Vendy screenshot
Vendy screenshot