β‘ The smart strategy router for the TON ecosystem. Turn idle TON into informed action β in seconds.
TonRoute is a testnet-first TON strategy router built with Next.js. It helps users inspect idle TON, compare Safe / Balanced / Yield outcomes, and route the next action through STON.fi and Tonstakers.
TonRoute is your personal co-pilot for navigating the TON blockchain. π§
In a world where every TON holder faces the same question β "What should I do with my idle balance?" β TonRoute answers it instantly. Instead of jumping between wallets, DEXs, and staking dashboards, you get a single, beautifully simple interface that:
- π Scans your idle TON in real time
- π Compares three strategy paths side-by-side: Safe, Balanced, and Yield
- π― Routes your next action straight into trusted protocols like STON.fi and Tonstakers
- π€ Plugs into Telegram so you can act anywhere, anytime
Whether you're a cautious holder who values capital preservation, a balanced thinker hunting for sustainable returns, or a yield maximizer chasing the best APY β TonRoute makes the decision easier, faster, and smarter. π
π§ͺ Testnet-first, production-ready architecture. Built for builders, traders, and the next wave of TON adopters.
- π Next.js + Cloudflare Workers β globally distributed, lightning fast
- π Non-custodial flow β your keys, your TON, always
- π€ STON.fi & Tonstakers integrations out of the box
- π¬ Telegram bot for on-the-go strategy execution
- π οΈ Open and extensible β drop in new strategies or routes
TonRoute is configured for full-stack deployment on Cloudflare Workers using the official Cloudflare OpenNext adapter. π
- Next.js on Workers: https://developers.cloudflare.com/workers/framework-guides/web-apps/nextjs/
- Workers Builds (Git auto deploy): https://developers.cloudflare.com/workers/ci-cd/builds/
- Node.js compatibility: https://developers.cloudflare.com/workers/runtime-apis/nodejs/
- Telegram Bot API webhooks: https://core.telegram.org/bots/api#setwebhook
Set these in Workers Builds β Build variables and secrets and in the deployed Worker env:
NETWORKNEXT_PUBLIC_APP_URLTONCENTER_API_KEYTONAPI_KEYTELEGRAM_BOT_TOKENTELEGRAM_WEBHOOK_SECRET
Optional local/demo-only vars:
NEXT_PUBLIC_ENABLE_DEMO_WALLETENABLE_DEMO_WALLETWALLET_VERSIONTON_WALLET_ADDRESSMNEMONICPRIVATE_KEYTON_WALLET_PUBLIC_KEY
β οΈ Do not enable the demo-wallet vars in public production unless you intentionally want server-side signing.
npm run devβ Next.js dev servernpm run previewβ Cloudflare/OpenNext local previewnpm run deployβ build + deploy to Cloudflarenpm run cf-typegenβ generate Cloudflare env typings
npm run bot:smokeβ verify bot token/API accessnpm run bot:webhook:setβ register the deployed webhook URLnpm run bot:webhook:infoβ inspect webhook statusnpm run bot:webhook:deleteβ remove webhooknpm run bot:pollingβ local long-polling dev mode only
Use Cloudflare Workers Builds and connect the main branch of this repository. The Worker name in the dashboard must match wrangler.jsonc (tonroute).
The deployed bot webhook endpoint is:
/api/telegram/webhook
After deploying, register it with:
NEXT_PUBLIC_APP_URL=https://<your-app>.workers.dev npm run bot:webhook:set
π Built with β€οΈ for the TON community π
Route smarter. Stake confidently. Grow with TonRoute. π