← All posts

Five products in one FastAPI monolith: HTMX, Telegram Mini App, and Stars

getdoday.ru: ~76k lines without React, themeParams and bot DNS pitfalls, Telegram Stars billing with entitlements.

Contents

In brief

In six weeks, Yaroslav (SwairIt) grew a FastAPI todo app into five products under getdoday.ru — zero React, ~76,000 lines, 1200+ tests. On Habr he breaks down architecture, HTMX choice, and Telegram Mini App pitfalls.

What happened

Under getdoday.ru: a cross-platform todo, tutor cabinet Lessio, school Q&A Razbery, traffic-rules trainer, and Tap Tower game. One FastAPI monolith with PostgreSQL, Jinja2, HTMX 2, Alpine.js, and Tailwind via CDN.

The author skipped React deliberately: server render plus hx-swap fragment updates instead of JSON APIs and virtual DOM. Structure is feature-based (app/tasks/, app/pdd/), not layered; shared auth, billing, and bot modules reuse across products.

Mini App pain points took hours each. themeParams from the SDK breaks a dark palette on Telegram's light theme — fix: own theme plus explicit toggle. Production DNS resolved api.telegram.org to a blocked address — monkey-patches across socket, asyncio, and httpcore layers. Only one Telegram datacenter IP responded from the VPS. In python-telegram-bot v21, assigning post_init after build() is silently ignored — use the builder.

Telegram Stars is single-merchant: payments land on your bot balance only; a marketplace where buyers pay sellers is impossible. Multiple paid verticals use entitlement flags (pdd_pro separate from global Pro).

Why it matters

The case shows multi-product backends and CRUD UIs without a SPA stack. HTMX felt snappier on mobile than some React apps — less serialization and JS parsing. For Telegram developers, the article lists production pitfalls missing from official docs.

Process: mypy --strict, ruff, pre-commit, GitHub Actions CI, cron-poll deploy ~60 seconds after push.

In practice

  1. Consider HTMX plus server render for CRUD instead of default SPA.
  2. Organize monoliths by feature with shared infrastructure — do not copy auth and billing.
  3. In Mini Apps, do not blindly apply themeParams — lock your own palette.
  4. On VPS, curl-test Telegram IPs; DNS patches may need multiple layers.
  5. For Stars, plan single-merchant and per-product entitlements upfront.
  6. Set library callbacks via builder, not post-build attribute assignment.

Takeaway

Not "HTMX vs React" — a story of one Python-focused developer shipping five products with strict typing and tests. Telegram and Stars pitfalls are especially valuable. Full breakdown with numbers is on Habr.