§01
Overview
- What it is: a civic-tech product for accepting and tracking ecological-violation reports: a map (Leaflet) with markers, photo/media upload, a violation detail page, a "Help Solve" button, Telegram authentication and bot, multilingual (ru/uz/en), background jobs, admin panel. Looks like a personal product/startup (build-in-public potential).
- Type / status / role: web-app (fullstack monorepo) / active / solo (~96% of commits are the user; in v2 — 4 commits from Shahzod).
- Activity window: 2025-08-09 → 2026-03-08. Two folders = two iterations:
ecomap_new(v1, Aug–Dec 2025, 51 commits): Next.js + Supabase.ecomap_full(v2, Feb–Mar 2026, 94 commits): full rewrite on the ShipKit monorepo stack (Elysia/Drizzle/BetterAuth).
§02
Stack
- v2 (`ecomap_full`, current): Turborepo monorepo (
apps/web,apps/admin,apps/api,apps/jobs+ 10 packages). Next.js 16 + React 19, Elysia.js (Bun) API with Eden Treaty (type-safe calls), Better Auth (+Redis session cache), Drizzle ORM + PostgreSQL, grammY (+@grammyjs/conversations) Telegram bot, sharp (violation photo processing), Resend (email), next-intl (ru/uz/en), Tailwind v4, shadcn/ui, Swagger. - v1 (`ecomap_new`): Next.js + Supabase (ssr + supabase-js), TanStack Query, extensive Radix/shadcn, Tiptap (rich-text), @ai-sdk/openai (AI categorization/processing), grammY, background queue, systemd (
ecomap-queue.service). - Infra: Bun, Turborepo, deploy scripts (API via
bun rundue to native sharp), systemd for the queue, Redis. - Data: PostgreSQL (Drizzle) in v2; Supabase Postgres in v1.
§03
What was shipped
- v1 (Supabase): internationalization (ru/uz/en — header/footer/home/map), locale-aware redirects (infinite-redirect fix), background queue + Telegram bot, AI SDK integration, Tiptap editor. Configured Claude GitHub Actions (PR Assistant + Code Review workflows).
- v2 (monorepo, rewrite): migration plan (
docs/migration-plan/TASKS.md), Telegram-auth flow (many iterations: postMessageauth_result, cross-origin session cookie withcredentials: include,setSessionCookie, duplicate-user protection by bot email, telegram→profiles sync), auth-route consolidation,USE_SECURE_COOKIESinstead of NODE_ENV, violation page with map and media props, deploy scripts,--external sharp(native dep). - Volume: ~145 commits total (51 v1 + 94 v2), ~139 from the user. Active iterative development, full rewrite between versions.
§04
Technical challenges
- Architecture migration v1→v2 (Supabase BaaS → self-hosted Elysia + Drizzle + Better Auth monorepo): documented plan (
docs/migration-plan/TASKS.mdwith a progress table). → Demonstrates a deliberate move away from BaaS vendor lock-in toward a controlled stack; a strong content story. - Telegram authentication on the web (
apps/api, a series of commits): handlingpostMessage {event:'auth_result',result:{...}}, setting the session cookie via Better Auth, solving the cross-origin cookie (credentials: include), duplicate protection (validating the bot-email formattelegram_{id}@ecomap.uz), syncing telegram data intoprofileson/me. → Real, non-trivial auth engineering (not "bolted on OAuth"). - Type-safe fullstack via Eden Treaty (Elysia → client): end-to-end typing of the API without codegen.
- Image processing (sharp) for violation photos + correct native-dep build (
--external sharp, deploy viabun run). - Background jobs (
apps/jobs+packages/jobs-shared+ queue + systemd) — work moved off the HTTP path. - AI processing (v1,
@ai-sdk/openai) — probably categorization/summarization of reports.
§05
AI-assisted development
- Sessions found: 99 .jsonl in the local Claude Code sessions directory for v2 (~42 MB) — very intense Claude Code usage on the v2 rewrite. (v1
ecomap_newhas a separate path with no direct CC sessions, but there isclaude[bot]in git.) - What was done with AI: the entire v2 rewrite was driven through Claude Code following
docs/migration-plan/TASKS.md(CLAUDE.md requires checking off tasks ✅ and updating the progress table — a structured AI-driven process). - AI workflow patterns (a strong brand signal):
- Claude GitHub Actions in v1:
claude/issue-N-*branches → PR, "Claude PR Assistant" and "Claude Code Review" workflows (7claude[bot]commits). - Plan-driven development with AI in v2: migration via TASKS.md with mandatory progress checkpoints.
.mcp.json,.playwright-mcp/,.kombai/— MCP tooling and Playwright MCP for UI.
§06
Achievements & metrics
- A complete civic-tech product across 2 iterations, rewritten onto a modern self-hosted stack.
- v2: 4 apps (web/admin/api/jobs) + 10 packages in Turborepo, solo.
- ~145 commits over ~7 months; 99 CC sessions (42 MB) on v2.
- Integrations: Telegram (auth + bot), maps (Leaflet), photos (sharp), email (Resend), AI (OpenAI in v1).