§01
Overview
- What it is: a full-stack B2B sales platform for cleaning chemicals. Public site (catalog, industries, blog, consumption calculators, leads), Elysia API, admin with RBAC (leads, catalog, quotes), and a Telegram mini-app for managers (calculator + quote PDF generation). Built on a custom SaaS boilerplate "ShipKit" (the DavrApps brand).
- Type / status / role: web-app (monorepo) / active / solo (~99% of commits are the user; one external contributor with 2 commits).
- Activity window: 2025-11-10 → 2026-05-14, ~6 months of dense development, alive (the most recent commits are May 2026 UI/content tweaks).
§02
Stack
- Languages: TypeScript (strict), SQL (Drizzle).
- Frameworks/libraries: Next.js 16 (App Router,
[locale]routing, Turbopack, React 19), Elysia.js (Bun-native API, typed), Drizzle ORM, Better Auth (+ RBAC, access-control), grammY (Telegram bot), @react-pdf/renderer (quote PDFs), next-intl v4.5 (useExtracted+.po/gettext), Tailwind v4 + shadcn/ui, Fuse.js (search), Polar.sh (from the boilerplate). - Infra/deploy: Turborepo (monorepo, 4 apps + 10 packages), Bun 1.3 (runtime + package manager), deploy-skill (nginx + systemd + SSL).
.mcp.json,.claude/skills/— AI-native scaffolding. - Data: PostgreSQL (Drizzle, 16+ tables), Redis (ioredis — cache, rate limit, usage).
- Notable tooling:
.penfiles (Pencil — design mockups), CLI package, React Email + Resend, the custom boilerplate as the foundation.
§03
What was shipped
Commit messages are tidy, conventional commits (feat(...), fix(...), refactor(...)) — unlike the older projects.
- Calculator domain model — tables
object_types,object_type_parameters,consumption_rules,calculation_periods: chemical consumption calculation by object type/parameters. - Consumption calculator + bin-packing (
feat(calc): industry-specific ... savings calculator— carwash/horeca/cleaning): picks packaging sizes to cover the required volume. - Commercial quotes —
quotes/quote_items, atomic numberingKP-00042, PDF generation (ru/uz, VAT, discounts). - Leads —
feat(leads): server-side /api/lead bridge posts to Telegram group via bot+localStorage retry queue(client-side retry queue on failure). - Telegram manager onboarding — invite tokens (
inv_...), mini-app calculator. - Blog with moderated comments —
feat(blog): moderated comments system end-to-end, 6 SEO articles. - Product compare + search —
feat(compare): /compare side-by-side,agent/search: catalog search with Fuse.js (Ctrl+K). - Site-wide i18n — next-intl
useExtracted+.po, 3 languages (ru/uz/en). - SEO — sitemap, robots, JSON-LD, route canonicalization with 301 redirects, noindex on utility pages.
- Volume: 189 commits over ~6 months. Notable: work runs through
agent/*branches (agent/calculators, agent/sample, agent/compare, agent/search, agent/routes-dedup) — parallel AI agents merged into master.
§04
Technical challenges
- Greedy bin-packing with unit tests (
apps/api/src/modules/v1/calculator/pack-greedy.ts+pack-greedy.test.ts): cover the requiredrequiredMlvolume with a set of packaging sizes — sort descending by volume,floorfor everything except the smallest pack,ceilto round up the remainder, money inBigInt(UZS). → A real algorithm + TDD; proof of engineering-grade work, not CRUD. - BigInt-safe money (
apps/api/src/lib/bigint-json.ts): prices/totals are stored as Drizzlebigint(no float precision issues), and a globalBigInt.prototype.toJSONfixes serialization in Elysia responses. A detailed comment justifies why this, not number. → A deliberate solution to monetary arithmetic. - Atomic quote numbering (
quotes/number.ts):UPDATE counters SET value = value + 1 ... RETURNING valueinside a transaction together with the quote insert → race-safeKP-NNNNNsequence. - Singleton Telegram bot with init-race protection (
telegram/bot.ts, grammY): double guard (botSingleton+botInitPromise), one-time invites with not_found/used/expired checks, mini-app launch via aweb_appbutton. - Quote PDF generation (
packages/pdf, @react-pdf/renderer): custom Cyrillic fonts, ru/uz, price snapshot at the moment of the quote (unitPriceUzsSnapshot), VAT/discount calculation, signatures/legal details. - i18n at scale (next-intl v4.5
useExtracted+ gettext.po,proxy.tsfor Next 16): professional localization of every page across 3 languages. - Monorepo architecture (Turborepo): clean separation of apps (web/api/admin/miniapp) and shared packages (auth/db/cache/ui/email/entities/pdf/cli) with
workspace:*.
§05
AI-assisted development
- Sessions found: 2 (local Claude Code sessions directory for this project), ~13 MB combined (9.3 MB + 3.3 MB) — very heavy AI usage. There's a
memory/directory. - What was done with AI: mass translation of every page (
useExtracted/getExtracted), calculator features, compare/search, SEO audit, blog content generation. Sessions include the project's ownI18N_GUIDE.mdas context. - AI workflow patterns (a strong brand signal):
- Parallel agents on git branches —
agent/calculators,agent/sample,agent/compare,agent/search,agent/routes-dedupmerged into master: the user parallelizes independent features across AI agents. - AI-native repository —
CLAUDE.md(210+ lines of rules "from real production bugs"),.claude/skills/(deploy/dev/ui-ux/polar),.mcp.json. - superpowers skills — sessions show
superpowers:using-superpowersbeing invoked. - The boilerplate is designed for AI assistants (Claude Code/Cursor/Copilot/Windsurf).
§06
Achievements & metrics
- 4 apps + 10 packages in one Turborepo, solo development.
- 16+ DB tables (Drizzle): posts, leads, products, product_variants, object_types, consumption_rules, calculation_periods, managers, manager_invites, quotes, quote_items, settings, counters, blogComments, subscriptions.
- 3 UI languages through a proper gettext pipeline.
- A real product on the most modern 2026 stack (Next 16 / React 19 / Bun / Elysia / Tailwind v4).
- The README positions the foundation as ShipKit — a boilerplate on which "4+ live SaaS are built."