Back to archive
IV. Client Builds & Logistics Platformssupportingcontributorclient anonymised

Food Delivery Storefront

Production food-delivery storefront (restaurant-chain.uz, Restaurant chain (UZ) chain / sister brand of Restaurant chain (UZ), Uzbekistan) — a fork of Vercel Next.js Commerce, retrofitted for a custom API, multi-city routing, and three languages.

Status
maintained
Period
2020-09-21 → 2026-05-18
AI sessions
Stack
Languages
TypeScriptJavaScriptCSS
Frameworks · Infra
Next.js 14 (Pages Router)React 18Tailwind CSSreact-query v3react-hook-formLeaflet/react-leafletYandex Mapsnext-translatenext-pwaframer-motion
§01

Overview

  • What it is: An e-commerce food-delivery platform for Uzbekistan. The base is Vercel Next.js Commerce, but the provider has been swapped for a custom one (framework/local) that talks to an external REST/GraphQL API for products, categories, and orders. Multi-city routing (/[city]/...), 3 languages (ru/uz/en), real-time order tracking on a map, PWA.
  • Type / status / role: web-app · maintained · contributor (team project, not solo).
  • Active period: project base since 2020-09 (Vercel upstream). User's contribution — from 2021-06-18 to 2026-05-18, i.e. ~5 years with gaps; alive (last commit — May 2026, config refactor).
§02

Stack

  • Languages: TypeScript (main), JavaScript, CSS modules.
  • Frameworks/libraries: Next.js 14.2.35 (Pages Router), React 18, Tailwind CSS (JIT, custom breakpoints and brand colors), react-query v3 (server state/polling), react-hook-form, axios + custom framework fetcher, leaflet/react-leaflet (order tracking), @pbe/react-yandex-maps + react-yandex-maps (address picker/geocoding), next-translate (i18n), next-pwa, framer-motion, libphonenumber-js, react-otp-input, react-hot-toast, keen-slider/react-slick/@egjs/react-flicking (carousels), next-seo, react-google-recaptcha-v3, react-facebook-pixel.
  • Infra/deploy: custom Express server (server.js, port 4646), PM2 (ecosystem.config.js, pm2.config.js), nginx.conf, deploy.sh (standalone deploy). No CI; pre-commit — husky + lint-staged (prettier). Hosting — own servers (authors include root@choparpizza.uz, davr@restaurant-chain.uz).
  • Data: external API (API_URL / publicRuntimeConfig.apiUrl), browser storage as state layer: user — localStorage mijoz (base64 JSON), location — sessionStorage yetkazish, active city — cookies (activeCity, city_slug). Locales pulled at runtime from the API (/api/get_langs).
  • Notable tooling: GraphQL codegen (legacy from Commerce, inactive), bun.lockb + yarn.lock + package-lock.json (three lock files → package managers changed over time), next-unused for dead-code detection, BUNDLE_ANALYZE.
§03

What was shipped

IMPORTANT: most of the user's commit messages are junk ("asdf", "asd", "remove", "s"), so the items below are derived from the code/diffs themselves, not commit text.

  • Custom commerce provider `framework/local` — replaced Shopify/BigCommerce/Swell with a custom API layer: operations get-site-info, get-all-products, get-product, get-page, cart/auth/wishlist hooks, custom fetcher.ts. This is the core of adapting the fork to the Uzbek backend.
  • City-dependent routing — root / redirects to /{city_slug} (default tashkent), all pages live under pages/[city]/, city validation server-side via getSiteInfo (404 if the city is missing).
  • Order tracking on the map (c8c6c7a7, Aug 2025, +899 lines): pages pages/[city]/track/[id]/ and pages/[city]/order/[id]/track/ (using the .client.tsx pattern for clean CSR).
  • OTP authorization — a string of commits "otpinput", "otp", "otpinput upgrade" (react-otp-input), plus "creditcard", "payment", "payment type" — payment and verification flow.
  • Courier icon by transport type (b9420dd0, Sep 2025): drive_type (bike/foot/car) → different lucide-react/react-icons icons.
  • Config refactor (5ff70a20, May 2026): removed runtime fetch of /api/configs/public + base64-decode + sessionStorage from 8 client components, replacing with a typed NEXT_PUBLIC_LES_* env config (lib/data/storefront-config.ts).
  • Perf/LCP fix (cb93c2b5): replaced raw <img> with next/image in MainSlider, removed unused Flicking imports.
  • Standalone deploy (1c41379a): deploy.sh + PM2 + nginx.
  • Volume: 403 user commits out of 2011 (the rest are Vercel upstream: Luis Alvarez 401, Belen Curcio 352, etc., + team: shahaa/Shahzod 154, Doniman, Ilhombek, Boburt). Activity in waves: peaks in 2023 (orders/categories/cards), 2025 (tracking, couriers), 2026 (config refactor). Project alive and maintained.
§04

Technical challenges

  • SSR-safe Leaflet tracking with polling (pages/[city]/track/[id]/index.client.tsx): Leaflet is SSR-incompatible → solved via dynamic(..., { ssr: false }) for MapContainer/TileLayer/Marker, conditional require('leaflet') under typeof window !== 'undefined', and replacing default icons (L.Icon.Default.mergeOptions). Courier position is updated in real time via react-query refetchInterval: 5000, which is disabled (shouldFetch=false) once the API returns success:false — protection against endless polling of a dead order. → Demonstrates: understanding of SSR/hydration, real-time UX, and request lifecycle management.
  • Custom Leaflet icon from a React component (same file, getCourierIcon): a React icon (lucide/react-icons) is rendered to a string via renderToStaticMarkup(<IconComponent/>) and embedded into an L.divIcon with an inline CSS @keyframes pulse-courier animation. Color/icon are selected based on drive_type. → A non-trivial bridge between React and the imperative Leaflet API.
  • Map center calculation guard (mapCenter useMemo): average of from/to coordinates with isNaN checks at each step and a cascading fallback (from+to → from → to → default for the active city). → Careful handling of edge cases with incomplete API data.
  • Replacing runtime config with env (5ff70a20): the diff removes the "fetch → Buffer.from(base64) → JSON.parse → sessionStorage" pattern across 8 components and pages/api/geocode.ts, switching to a typed storefrontConfig from env. → Refactor for fewer client round-trips and type safety; a mature engineering decision (though AI-assisted — see below).
  • Vercel Commerce provider abstraction over a foreign API (framework/local/api/operations/get-site-info.ts, fetcher.ts): implementing @commerce interfaces (OperationContext, types City/LinkItem/SocialIcons), aggregating menu+cities+categories into a single getSiteInfo, resolving currentCity by slug. → Working within someone else's plugin architecture without breaking its contracts.
§05

AI-assisted development

  • Sessions found: 0 — the local Claude Code sessions directory for this project does not exist (neighboring chopar/les-* projects do, but not this one).
  • What was done with AI: at the same time, 5 commits are tagged `Co-Authored-By: Claude (Opus 4.7, 1M context)` — meaning AI was used, but without a recorded CC session for this repo (likely from another directory/tool). AI-assisted commits: env config refactor (5ff70a20), standalone PM2+nginx deploy (1c41379a), LCP fix with next/image (cb93c2b5), DNS fetch fix + 404 redesign (6762281b), merge (73f6c10b).
  • AI-workflow patterns: AI was used for narrowly scoped, well-bounded tasks — refactors with a clear scope ("8 components", "5 keys"), perf optimization, infra wiring. Commit messages on these are dramatically better than the rest (structured, with a bulleted list of changes) — a classic signature of AI assistance.
  • No full Claude Code sessions exist in the project.
§06

Achievements & metrics

  • Real production: restaurant-chain.uz — a live website of a restaurant chain (confirmed by social links facebook.com/lesailesuz, instagram.com/lesailesuz in code and author domains @restaurant-chain.uz, @choparpizza.uz).
  • Codebase scale: 2011 commits total, ~403 by the user; multi-city + 3 languages (ru/uz/en); ~24 component directories under components_new/ (header, cart, order, profile, sale, delivery, branch, news…).
  • Longevity: ~5 years of maintenance (2021→2026), itself a signal of real production use.
  • Integrations (from code): OpenStreetMap/Leaflet, Yandex Maps + geocoder, Facebook Pixel, reCAPTCHA v3, payment types, OTP verification, PWA.
§07

Contributors

git shortlog · all branches

  1. Dave93424
  2. Belen Curcio499
  3. Luis Alvarez415
  4. shahzodsalimsakov161
  5. root112
  6. cond0r60
  7. Franco Arza56
  8. Administrator49
  9. Julián Benegas34
  10. ghoskin27
  11. Boburt26
  12. Doniman24
57 contributors · +45 more not shown2,011 commits total
Currently

Open to Senior / Staff engineering roles and selective freelance — production AI, platform, and full-stack work.

Get in touch