Back to archive
I. Personal Ventures & Frameworkshowcasesoloclient anonymised

B2B Chemicals SaaS

Production B2B SaaS for cleaning-chemicals supplier B2B chemicals supplier (UZ) (Uzbekistan): website + API + admin + Telegram mini-app, built on a custom ShipKit boilerplate on a bleeding-edge stack.

Status
active
Period
2025-11-10 → 2026-05-14
AI sessions
2
Stack
Languages
TypeScriptSQL
Frameworks · Infra
Next.js 16Elysia.jsDrizzle ORMBetter AuthgrammYReact PDFTurborepo
§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: .pen files (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 quotesquotes/quote_items, atomic numbering KP-00042, PDF generation (ru/uz, VAT, discounts).
  • Leadsfeat(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 commentsfeat(blog): moderated comments system end-to-end, 6 SEO articles.
  • Product compare + searchfeat(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 required requiredMl volume with a set of packaging sizes — sort descending by volume, floor for everything except the smallest pack, ceil to round up the remainder, money in BigInt (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 Drizzle bigint (no float precision issues), and a global BigInt.prototype.toJSON fixes 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 value inside a transaction together with the quote insert → race-safe KP-NNNNN sequence.
  • 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 a web_app button.
  • 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.ts for 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 own I18N_GUIDE.md as context.
  • AI workflow patterns (a strong brand signal):
  • Parallel agents on git branchesagent/calculators, agent/sample, agent/compare, agent/search, agent/routes-dedup merged into master: the user parallelizes independent features across AI agents.
  • AI-native repositoryCLAUDE.md (210+ lines of rules "from real production bugs"), .claude/skills/ (deploy/dev/ui-ux/polar), .mcp.json.
  • superpowers skills — sessions show superpowers:using-superpowers being 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."
§07

Contributors

git shortlog · all branches

  1. Dave93137
  2. Your Name50
  3. handenis86-ux2
3 contributors189 commits total
Currently

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

Get in touch