A Go HTTP server that integrates Telegram Bot API + Kaspi Shop Marketplace API to sync merchant orders and send Telegram notifications about new orders.
- Periodically syncs orders from Kaspi Shop Marketplace API
- Creates notification “tasks” for new orders
- A worker processes tasks and sends messages to merchants via Telegram Bot
- Sync: server pulls latest orders from Kaspi API
- Detect: finds “new” orders (not processed yet)
- Enqueue: creates notification tasks in DB
- Worker: consumes tasks and sends Telegram messages via Bot API
Kaspi API —> Sync job —> DB tasks —> Worker —> Telegram Bot API —> Merchant chat
- cmd/kaspi-bot/ — app entrypoint
- internal/ — business logic (sync, workers, services)
- db/ — DB layer / queries (sqlc-based workflow)
- pkg/env/ — config/env helpers
- .k8s/ — Kubernetes manifests for deployment
- docker-compose.yaml , Dockerfile , Makefile — local/dev + build tooling
- .env.example — example environment config
Use .env.example as your base config.
cp .env.example .env
make up-infraAll configuration is via environment variables (.env). You’ll typically need:
- Telegram bot token
- Kaspi API Token
- Database connection string
- Worker/sync settings (intervals, concurrency) (Optional)
Exact keys: see .env.example.
- This is built as an HTTP server (so it’s deploy-friendly and easy to run in k8s)
- Notifications are task-based to avoid losing events and to keep retries clean