A Telegram bot that took a user from a single message to a finished, paid-for deliverable, with no human in the loop at any step. Built, deployed, and run in production; the bot has since been retired, and the source is public.
WHAT IT DID
A user started a conversation, answered a few questions about their niche, and the bot generated a complete business asset pack — content, copy, and supporting documents. It previewed part of the result, took payment, then delivered the full package as downloadable files.
HOW IT WORKS
A Node.js and Express service receives Telegram webhooks and routes them through modular command handlers, holding conversation state across a multi-step flow. The Anthropic Claude API does the generation, with configurable models, tuned token budgets, and automatic retry on transient failures.
Payment runs on Stripe, and the fulfillment path is idempotent by design: incoming webhook events are deduplicated by event ID, and a unique database constraint on the charge makes double-delivery and double-charging structurally impossible rather than merely unlikely. Session and usage state lives in Redis on Upstash, with an in-memory fallback so the service runs locally without external dependencies.
It ships as a multi-stage Docker image that runs as a non-root user with health checks and correct signal handling for graceful shutdown, behind a GitHub Actions pipeline that builds and validates the image on every push.
A Telegram bot that took a user from a single message to a finished, paid-for deliverable, with no human in the loop at any step. Built, deployed, and run in...