OlovGo
A full five-surface food-delivery platform for Uzbekistan — a NestJS/Prisma backend with a real-time order engine, a Next.js web app, and three native Expo apps (customer, courier, restaurant) — architected end to end as founder and lead engineer.
The problem
Food delivery in Uzbekistan means coordinating customers, restaurants, couriers and admins in real time, with phone-based onboarding, local payment rails (Click/Payme), cash-on-delivery commission reconciliation, and a trilingual audience — while guaranteeing orders and money are never duplicated or lost over flaky mobile networks, across web and native iOS/Android at once.
The solution
One backend exposing ~106 typed REST endpoints plus a JWT-authenticated WebSocket gateway acts as the source of truth for five clients. Orders are atomic and retry-safe via a Redis idempotency layer; an explicit, role-gated, audited state machine drives every status change and pushes it to all parties. Auth is SMS-OTP with guest upgrade; payments use a signature-verified Click webhook; and a separate cron app handles weekly settlements. Web and three Expo apps consume an OpenAPI-generated SDK and support UZ/RU/EN with OTA updates and Docker/nginx deploys.
Overview
OlovGo (Issiq taom, hoziroq — hot food, right now) is a production-grade, multi-sided food-delivery platform built from the ground up across five codebases: a NestJS monorepo backend, a Next.js web application, and three strict-TypeScript Expo (React Native) apps for customers, couriers, and restaurant staff. The domain model alone spans 23 Prisma entities and 15 enums covering users, guest sessions, device fingerprinting, restaurants and staff, menus with combo-sets and price history, carts with promo codes, an eight-state order lifecycle, courier assignments and GPS presence, payments, settlements, reviews and favorites. The backend exposes around 106 REST endpoints documented with Swagger/OpenAPI, which is itself the source of truth for typed client codegen in every mobile app.
The engineering depth is the point. Order creation is fully atomic and protected by a Redis-backed idempotency interceptor (atomic reservation + canonical body-hashing) so customer retries can never create duplicate orders. The order state machine enforces role-gated transitions, writes an immutable status-history audit trail, snapshots item names/prices/images onto each order so later menu edits never mutate past orders, and fans every change out over WebSockets and push notifications. Real-time runs on a raw ws gateway with query-token JWT auth, a 30-second heartbeat that drops dead mobile sockets, courier presence, live GPS broadcast, and restaurant online/offline derived from owner connections.
Authentication is phone + SMS OTP with bcrypt-hashed codes in Redis, per-phone rate limiting, brute-force caps, seamless guest-to-customer upgrade, and rotating hashed refresh tokens. Money flows are handled carefully: per-restaurant commission computed after promo discounts, a signature-verified Click payment webhook with a two-phase protocol, and a weekly settlement cron that idempotently ledgers cash-order commissions into restaurant balances. A dedicated batch app runs the schedules, and the platform ships with Sentry, Pino logging, trilingual (UZ/RU/EN) server messages, S3/Sharp image handling, and Docker + nginx health-checked deploys.
Key features
- Eight-state order lifecycle with role-gated transitions, an immutable status-history audit trail, and order-time snapshots of item names, prices and images
- Redis-backed idempotency interceptor (atomic reservation + body-hash conflict detection) making order creation safe against retries and duplicates
- Raw ws WebSocket gateway with JWT auth, 30s heartbeat, channel subscriptions, courier presence, live GPS broadcast, and owner-driven restaurant online/offline
- Phone + SMS OTP auth with bcrypt-hashed codes in Redis, rate limiting, brute-force caps, guest-to-customer upgrade and rotating refresh tokens
- Local payments + finance: signature-verified Click webhook, per-restaurant commission after discounts, and a weekly cash-commission settlement cron
- Dedicated batch app running scheduled jobs — weekly settlements and 15-minute auto-completion of delivered orders
- Three native Expo apps (customer, courier, restaurant) on a shared strict-TS architecture with OpenAPI-generated clients, OTA delivery, Mapbox, GPS and push kassa alerts
- Next.js 16 web app with role-based route protection, TanStack Query + Zustand, and separate customer/restaurant/courier/admin portals
- Full trilingual (UZ/RU/EN) support with Sentry, Pino logging, throttling and Docker + nginx health-checked deploys