Task Shop
Reference Teleforge sample app that exercises the full V1 stack with a simple task marketplace flow.
What It Covers
@teleforgex/bot:/start,/tasks, andweb_app_dataorder handling@teleforgex/web: launch data, theme, and checkout mode protection@teleforgex/ui: Telegram-native cards, buttons, typography, and boundaries@teleforgex/core:publishToBot()and Ed25519 initData validation
Structure
apps/bot: Telegram long-polling bot runtime, plussrc/runtime.tsfor simulator chat executionapps/web: Vite Mini App with browse, cart, checkout, and success routespackages/types: shared task and order typesteleforge.app.json: manifest for the sample workspace
Setup
- Build the framework packages once from the repo root:
pnpm build
- Install the sample workspace dependencies:
cd apps/task-shop
pnpm install
cp .env.example .env
- Start the whole local stack:
pnpm dev
pnpm dev now runs teleforge dev --public --live, which starts the Vite Mini App, a public tunnel, and the companion bot process together. The Task Shop sample bot uses polling, so webhook auto-configuration stays off by default.
If you only want local browser development without a tunnel, use:
pnpm run dev:local
In local simulator mode, teleforge dev also executes /start, /tasks, and web_app_data through apps/bot/src/runtime.ts, so most bot-and-Mini-App flow work can happen without Telegram.
If BOT_TOKEN is not configured, the bot stays in preview mode and logs simulated /start, /tasks, and order-handling output so the command wiring can still be inspected locally.
Environment
BOT_TOKEN: Telegram bot token for live pollingMINI_APP_URL: optional override for the/startbutton URL. When omitted, Teleforge injects the current local or tunneled dev URL.VITE_TELEGRAM_BOT_ID: bot ID for Ed25519 initData verification in the clientVITE_TELEGRAM_PUBLIC_KEY: Telegram environment public key for Ed25519 verification
Use Telegram’s production Ed25519 public key by default unless you are testing against Telegram’s test environment.