All projects

Personal project · Telegram Mini App

Dice Fitness

An accountability game a mate and I play in Telegram, with dice rolls to decide our exercise forfeits.

My role
Designed the game and built the Telegram bot and Mini App
Development
AI-assisted development
Tools
TypeScript, Three.js, grammY, PostgreSQL

Forfeits that were good for us

A mate and I wanted a way to keep each other accountable. We made exercise the forfeit because it was something good for us anyway. I built Dice Fitness so we could roll for each other and keep track of what we owed, all from the Telegram chat we already used.

Making it feel part of Telegram

The first version was a bot that used Telegram’s animated dice in the chat. I later built a Telegram Mini App that opens inside Telegram from that same chat. I used the same dark colours and blue buttons, and set the Telegram header and bottom bar to match the game. Roll and Activity stay visible at the bottom so we can switch between them with one tap.

Two rolls, one forfeit

Pick the person the forfeit is for, roll for the exercise and roll again for the number of reps or the time. You can rule out movements before rolling, for example if you have an injury.

The server chooses and saves each result in PostgreSQL, and Three.js animates the dice. If we close the app between rolls, we can open it again and pick up where we left off.

Loading video…
The Dice Fitness Mini App with sample players. Alex rolls 20 push-ups for Sam.

Keeping track of what we owe

Activity opens on Owed. Each forfeit has its own row, so we can tick off one exercise at a time in whatever order we do them.

History shows what we’ve completed, grouped by day. We can filter by person or a date and time range to find a particular entry. I kept the leaderboard in the group chat, where the bot updates the same message as we tick things off.

Loading video…
Owed and History in the Mini App preview. Ticking off Sam’s push-ups adds them to the completed list.