Skip to content

Telegram bot which reminds you to drink water and logs water intake

License

Notifications You must be signed in to change notification settings

flashblaze/drinky-bot

Repository files navigation

Drinky Bot

A Telegram bot that helps you track your daily water intake and stay hydrated. Set daily goals, log your water consumption, view statistics, and receive automated reminders to drink water throughout the day.

Deploy to Cloudflare

Features

  • Log Water Intake: Track your daily water consumption with simple commands
  • Set Daily Goals: Define and track your hydration goals
  • View Statistics: Check your daily water intake progress
  • Smart Reminders: Get automated reminders at customizable intervals to help you stay hydrated

Tech Stack

Setup

Prerequisites

  • Node.js (v22 or higher)
  • pnpm
  • Cloudflare account with Workers and Durable Objects enabled
  • Telegram Bot Token (from @BotFather)

Installation

pnpm install

Development

  1. Copy .dev.vars.example to .dev.vars
  • Add your BOT_TOKEN:
  • Set MODE to development when running locally. You can skip when deploying to Cloudflare.
cp .dev.vars.example .dev.vars
  1. Start the development server:
pnpm run dev

Deployment

Deploy to Cloudflare Workers:

pnpm run deploy

Type Generation

Generate TypeScript types for Cloudflare bindings:

pnpm run cf-typegen

This generates the CloudflareBindings type that should be used when instantiating Hono:

// src/index.ts
const app = new Hono<{ Bindings: CloudflareBindings }>();

Database Migrations

Generate new migrations after schema changes:

pnpm run db:generate

About

Telegram bot which reminds you to drink water and logs water intake

Topics

Resources

License

Stars

Watchers

Forks