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.
- 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
- Runtime: Cloudflare Workers
- API Framework: Hono
- Bot Framework: Grammy
- Database: Drizzle ORM with SQLite via Cloudflare Durable Objects
- Linting and Formatting: oxc
- Node.js (v22 or higher)
- pnpm
- Cloudflare account with Workers and Durable Objects enabled
- Telegram Bot Token (from @BotFather)
pnpm install- Copy
.dev.vars.exampleto.dev.vars
- Add your
BOT_TOKEN: - Set
MODEtodevelopmentwhen running locally. You can skip when deploying to Cloudflare.
cp .dev.vars.example .dev.vars- Start the development server:
pnpm run devDeploy to Cloudflare Workers:
pnpm run deployGenerate TypeScript types for Cloudflare bindings:
pnpm run cf-typegenThis generates the CloudflareBindings type that should be used when instantiating Hono:
// src/index.ts
const app = new Hono<{ Bindings: CloudflareBindings }>();Generate new migrations after schema changes:
pnpm run db:generate