All projects

LearnBG

GNUBG · Telegram · Web / 2025-26
Simplified analysis flow
  1. 01Telegram / Web
  2. 02FastAPI
  3. 03RQ + Redis
  4. 04GNU Backgammon CLI
  5. 05Analysis and exports

3

processes on two servers

7

paid services

2

interfaces: Telegram and web

Live productnards.mini.app.gnubg.ruBackgammon web tools

From a bot delivering match files to a web product for backgammon analysis and teaching.

Where it started

The first request was a small Telegram bot that sent match files. I continued developing the system as new needs emerged.

The problem

GNU Backgammon had no suitable API for the workflow. Its analysis was available through a CLI, while users needed clear results in a web interface.

What I built

  • Built an API wrapper around the GNU Backgammon CLI and parsed its console output
  • Added visualizations, an editable landing page and an article system
  • Separated the aiogram bot, FastAPI web service and RQ analysis worker into three processes on two servers
  • Kept Redis and PostgreSQL inside a private Tailscale network
  • Queued match files through S3 and RQ, with a Redis lock around the analysis engine
  • Decoupled the analysis worker from Telegram: the worker writes status to Redis and the bot sends notifications
  • Unified Telegram and web accounts, with seven paid services and balance checks in middleware
  • Added Flask-AppBuilder administration, match playback, error analysis, a position editor and PDF/Excel exports

How it evolved

The bot became part of a closed web product focused on teaching. Analysis, visualizations, learning materials and game tools now live in one system.

The outcome

Users upload a match and receive error analysis, statistics and exports. A tool without a ready-made API is now integrated through a dedicated wrapper, queue and result processing.

What this demonstrates

Integrating a CLI tool, designing the backend and growing a product from a small initial feature.