progress-bot

A deployed Telegram bot for tracking habits and measurements, driven entirely by inline buttons in one self-updating message.

  • Go
  • SQLite
  • Telegram Bot API
  • gonum/plot

Problem

Tracking gym progress, habits and measurements in a chat usually floods the chat with messages. This bot does everything through inline buttons in a single message that keeps updating, so the chat never gets cluttered.

  • Folders group things and can be nested to any depth.
  • Boxes store entries, in two types:
    • Check: a habit, done or not done per day, with a streak and a grid of the last 30 days.
    • Measure: a number per day (weight, seconds, reps), with a PNG chart on demand.

Architecture

Packages

  • main.go

    Entry point, wires up dependencies.

  • internal/bot

    Telegram logic: menu, buttons, text input.

  • internal/storage

    SQLite: folders, boxes, entries.

  • internal/chart

    PNG chart generation.

Pure Go, no CGO: the SQLite driver is a pure-Go implementation.

Key decisions

  • One message as the whole UI. Navigation edits the same message instead of sending new ones.
  • No CGO. modernc.org/sqlite keeps the build a single static Go binary.
  • Long polling via go-telegram-bot-api, so it doesn’t need a public webhook endpoint.

Tech

Go 1.25, go-telegram-bot-api (long polling), modernc.org/sqlite, gonum/plot for charts, and godotenv.

Next project

Rust, distributed transactions

Payment Processing Service

Six Rust microservices that move money with an orchestrated saga, a double-entry ledger, idempotent payments and an append-only audit log.