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.
Key decisions
- One message as the whole UI. Navigation edits the same message instead of sending new ones.
- No CGO.
modernc.org/sqlitekeeps 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.