Public
Gamified Arcade Telegram Mini App with Hono, React, SQLite
gamehonomini-appreacttelegram
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data โ all from the browser, and deployed in milliseconds.
A complete, full-stack Telegram Mini App (TMA) for a gamified arcade platform, built as a single Val Town project.
- Backend: Hono +
std/sqlite(persistent), HMAC-secured TelegraminitDataauth, provably-fair server-side game logic. - Frontend: React 18 + Tailwind (Twind) + Framer Motion, styled with native Telegram theme variables, Haptic Feedback, skeleton loading.
- Payments: Telegram Stars (
XTR) invoice generation + TON option + webhook credit handler.
api.tsxโ Hono backend: auth, config, admin, promo, referrals, payments, webhook, and all three games.frontend/root.tsxโ HTML shell (stamps the immutable client entry).frontend/index.tsxโ the single-file React client (all screens).
| Var | Default | Purpose |
|---|---|---|
BOT_TOKEN | embedded | Validates Telegram initData HMAC SHA-256 |
ADMIN_TELEGRAM_IDS | 6819127801 | Comma-separated admin IDs (admin dashboard access) |
PROVIDER_TOKEN_STARS | XTR | Telegram Stars provider token |
BOT_USERNAME | YourArcadeBot | Used to build t.me/bot?start=REF_ID referral links |
- Set your real
BOT_TOKENandADMIN_TELEGRAM_IDSin the val's environment variables. - Point your Telegram bot's Mini App URL at the live endpoint (see above).
- Set your bot's webhook to
โฆ/api/webhook/telegramto receive Starspre_checkout_queryand payment confirmations.
- Space Booster โ crash simulator. Server picks a crash point via HMAC; eject before it crashes to win
bet ร multiplier. - Color Wheel โ 3 sectors: Alpha (x2), Beta (x2), Gamma (x14). Server decides the winning sector.
- Match Predictor โ stake points on fixture outcomes; correct predictions pay out at the odds.
Visible only to users whose Telegram ID is in ADMIN_TELEGRAM_IDS:
- Dynamic Text Studio โ edit any UI label (game names, currency symbol, buttons) live in
app_config. - Promo Code Generator โ create codes with reward amount + max activations.
- User search & balance management.
Demo promo code seeded: WELCOME (+50 โญ).
Tables: users, promo_codes, user_promos, app_config, transactions, games_state. All created idempotently with CREATE TABLE IF NOT EXISTS on startup.