OneLink
All case studiesGaming · Telegram Mini App

Telegram Mini App with mini-games and a quest system

An app inside Telegram with a real-time chart, reward levels and a referral program

About the project

The client’s product is for an audience in India that lives in Telegram: games, a wallet and tasks have to open in a single window, with no installation and no separate sign-up. Money is in rupees, and payments are handled by an external provider. The client needed a working foundation to keep adding games and mechanics to.

Tech stack

ReactViteGoPostgreSQLRedisWebSocket

Task

Build an app inside Telegram for an audience in India: sign-in without registration, a rupee wallet, mini-games, a real-time chart, a task system and a referral program.

Constraints

The app lives inside Telegram: sign-in works only through signed Telegram data, and the interface is designed for phones. Top-ups go through an external payment provider with signed callbacks. The price chart cannot be built separately for each client: all users need one shared data stream from the exchange. Game results are always calculated on the server; the client decides nothing.

Solution

The frontend is built with React and the server with Go, PostgreSQL and Redis. The server keeps a single outgoing connection to the exchange, stores one-second candles in Redis and streams them to clients over WebSocket. We implemented mini-games, a wheel of fortune, 60 levels of tasks with rewards and a referral program. A Python bot opens the app with a button and accepts referral links. Everything runs in Docker Compose behind nginx.

Challenges

Tasks and rewards come in different types, so we described them with a polymorphic model with automatic level-ups. Charging, calculating the result and updating task progress happen in a single transaction.

Further development

Games, tasks and rewards are defined as data and separate modules, so the set of games and the level conditions can be extended without reworking the core.

Result

We launched a Mini App with Telegram sign-in, a wallet with top-ups and bonus currency exchange, mini-games, a real-time price chart, 60 levels of tasks and rewards, and a referral program.