§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-queryv3 (server state/polling),react-hook-form,axios+ customframeworkfetcher,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 includeroot@choparpizza.uz,davr@restaurant-chain.uz). - Data: external API (
API_URL/publicRuntimeConfig.apiUrl), browser storage as state layer: user — localStoragemijoz(base64 JSON), location — sessionStorageyetkazish, 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-unusedfor 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, customfetcher.ts. This is the core of adapting the fork to the Uzbek backend. - City-dependent routing — root
/redirects to/{city_slug}(defaulttashkent), all pages live underpages/[city]/, city validation server-side viagetSiteInfo(404 if the city is missing). - Order tracking on the map (
c8c6c7a7, Aug 2025, +899 lines): pagespages/[city]/track/[id]/andpages/[city]/order/[id]/track/(using the.client.tsxpattern 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 typedNEXT_PUBLIC_LES_*env config (lib/data/storefront-config.ts). - Perf/LCP fix (
cb93c2b5): replaced raw<img>withnext/imagein 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 viadynamic(..., { ssr: false })forMapContainer/TileLayer/Marker, conditionalrequire('leaflet')undertypeof window !== 'undefined', and replacing default icons (L.Icon.Default.mergeOptions). Courier position is updated in real time viareact-queryrefetchInterval: 5000, which is disabled (shouldFetch=false) once the API returnssuccess: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 viarenderToStaticMarkup(<IconComponent/>)and embedded into anL.divIconwith an inline CSS@keyframes pulse-courieranimation. Color/icon are selected based ondrive_type. → A non-trivial bridge between React and the imperative Leaflet API. - Map center calculation guard (
mapCenteruseMemo): average of from/to coordinates withisNaNchecks 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 andpages/api/geocode.ts, switching to a typedstorefrontConfigfrom 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@commerceinterfaces (OperationContext, typesCity/LinkItem/SocialIcons), aggregating menu+cities+categories into a singlegetSiteInfo, resolvingcurrentCityby 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/lesailesuzin 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.