Building a Telegram Bot for Health Tracking


I built a custom Telegram bot for health tracking instead of using existing apps, providing complete control over data privacy and feature implementation.

Why Telegram? #

How It Works #

Daily Check-ins: 7 AM PST reminders for five habit metrics: weight training, cardio, diet adherence, sleep (8+ hours), and steps (5,000+).

Weekly Measurements: Monday check-ins for weight and waist circumference with progress tracking.

Daily engagement was chosen over weekly reporting for better habit reinforcement, goal awareness, and progress visibility.

Usage #

Search @sehatmand_bot on Telegram. Commands: /start to register, /daily for check-ins, /weekly for measurements, /stats for user history.

Self-Hosting #

Deploy privately with Docker:

  1. Create .env file: BOT_API_KEY=your_telegram_bot_token
  2. Create empty app.db file
  3. Use docker-compose.yaml:
version: "3.8"
services:
  sehat:
    image: ghcr.io/manparvesh/sehat:main
    volumes:
      - ./app.db:/data/app.db
    env_file:
      - .env
    restart: always
  1. Run: docker compose up

Future Plans #


“Sehatmand” means “healthy” in Punjabi/Hindi