Skip to content

NexVar/tonroute

Repository files navigation

πŸš€ TonRoute

⚑ 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.


πŸ’‘ About

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.


✨ Key Highlights

  • 🌐 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

☁️ Cloudflare deployment

TonRoute is configured for full-stack deployment on Cloudflare Workers using the official Cloudflare OpenNext adapter. πŸš€

πŸ“š Official references

πŸ”‘ Required Cloudflare env vars

Set these in Workers Builds β†’ Build variables and secrets and in the deployed Worker env:

  • NETWORK
  • NEXT_PUBLIC_APP_URL
  • TONCENTER_API_KEY
  • TONAPI_KEY
  • TELEGRAM_BOT_TOKEN
  • TELEGRAM_WEBHOOK_SECRET

Optional local/demo-only vars:

  • NEXT_PUBLIC_ENABLE_DEMO_WALLET
  • ENABLE_DEMO_WALLET
  • WALLET_VERSION
  • TON_WALLET_ADDRESS
  • MNEMONIC
  • PRIVATE_KEY
  • TON_WALLET_PUBLIC_KEY

⚠️ Do not enable the demo-wallet vars in public production unless you intentionally want server-side signing.

πŸ’» Local commands

  • npm run dev β€” Next.js dev server
  • npm run preview β€” Cloudflare/OpenNext local preview
  • npm run deploy β€” build + deploy to Cloudflare
  • npm run cf-typegen β€” generate Cloudflare env typings

πŸ€– Telegram bot commands

  • npm run bot:smoke β€” verify bot token/API access
  • npm run bot:webhook:set β€” register the deployed webhook URL
  • npm run bot:webhook:info β€” inspect webhook status
  • npm run bot:webhook:delete β€” remove webhook
  • npm run bot:polling β€” local long-polling dev mode only

πŸ”„ Git auto-deploy

Use Cloudflare Workers Builds and connect the main branch of this repository. The Worker name in the dashboard must match wrangler.jsonc (tonroute).

πŸ”— Telegram webhook path

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. πŸ’Ž

About

πŸš€ Smart strategy router for the TON ecosystem β€” inspect idle TON, compare Safe/Balanced/Yield outcomes, and route through STON.fi & Tonstakers in seconds. πŸ’Ž

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors