No description
Find a file
luvlaceeeee 73938ced8a
All checks were successful
ci-deploy / ci (push) Successful in 1m35s
ci-deploy / deploy (push) Has been skipped
chore(ops): notify-neat-migration script for one-off post-ADR-0011 ping
The 20260521120000_neat_eat_split migration backfilled step_bucket +
workout_frequency from the old activity_level column silently. Users
whose onboarding pre-dates that schema change deserve a one-line
heads-up that their TDEE/calorie norm got more accurate and they can
fine-tune the inputs on /calories.

Script is opt-in: dry-run by default, --send actually messages. Filter
intentionally restricts to users with both NEAT and EAT buckets set
(implies they came from the backfill path or set them themselves) AND
onboarding completed before 2026-05-21 (the migration date).

Стрим 5, task 5.6.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 17:16:56 +03:00
.forgejo/workflows ci: deploy only on release-* tag or manual dispatch 2026-05-24 20:42:54 +03:00
prisma feat(reminders): anti-ED copy + weekday-frequency cap for weight reminder 2026-05-26 17:15:31 +03:00
scripts chore(ops): notify-neat-migration script for one-off post-ADR-0011 ping 2026-05-26 17:16:56 +03:00
src feat(reminders): anti-ED copy + weekday-frequency cap for weight reminder 2026-05-26 17:15:31 +03:00
tests feat(reminders): anti-ED copy + weekday-frequency cap for weight reminder 2026-05-26 17:15:31 +03:00
.dockerignore chore: snapshot pending work and harden compose for VPS deploy 2026-05-13 23:06:52 +03:00
.env.example feat(fr-13.17): фото и кружки для записи приёма пищи через zbar+OFF+vision 2026-05-24 18:21:53 +03:00
.env.qa.example chore: snapshot pending work — composite dishes, time-of-day product ranking, rename product, QA telegram tooling 2026-05-22 18:44:22 +03:00
.gitignore chore: snapshot pending work — composite dishes, time-of-day product ranking, rename product, QA telegram tooling 2026-05-22 18:44:22 +03:00
.prettierignore chore: bootstrap project scaffolding 2026-05-07 17:14:31 +03:00
.prettierrc chore: bootstrap project scaffolding 2026-05-07 17:14:31 +03:00
CLAUDE.md feat(ui): add list/pagination/undo helpers + design-system reference 2026-05-25 15:49:26 +03:00
docker-compose.prod.yml chore: snapshot pending work and harden compose for VPS deploy 2026-05-13 23:06:52 +03:00
docker-compose.yml chore: snapshot pending work and harden compose for VPS deploy 2026-05-13 23:06:52 +03:00
Dockerfile feat(fr-13.17): фото и кружки для записи приёма пищи через zbar+OFF+vision 2026-05-24 18:21:53 +03:00
eslint.config.js feat(fr1): plan and template CRUD via /plan 2026-05-07 17:57:21 +03:00
package-lock.json feat(fr-13.17): фото и кружки для записи приёма пищи через zbar+OFF+vision 2026-05-24 18:21:53 +03:00
package.json feat(fr-13.17): фото и кружки для записи приёма пищи через zbar+OFF+vision 2026-05-24 18:21:53 +03:00
prisma.config.ts chore: bootstrap project scaffolding 2026-05-07 17:14:31 +03:00
README.md chore: snapshot pending work and harden compose for VPS deploy 2026-05-13 23:06:52 +03:00
tsconfig.json chore: bootstrap project scaffolding 2026-05-07 17:14:31 +03:00
tsconfig.test.json chore: bootstrap project scaffolding 2026-05-07 17:14:31 +03:00
vitest.config.ts feat(fr1): plan and template CRUD via /plan 2026-05-07 17:57:21 +03:00
vitest.integration.config.ts feat(fr1): plan and template CRUD via /plan 2026-05-07 17:57:21 +03:00

Workout Bot

Personal Telegram bot for tracking workouts and daily steps. See ../docs/spec.md for the product spec.

Prerequisites

  • Node.js LTS (≥ 22.x)
  • Docker + Docker Compose (for local Postgres and Redis)
  • A Telegram bot token from @BotFather

Local setup

cp .env.example .env       # then put your BOT_TOKEN in
docker compose up -d       # start postgres and redis (DB only)
npm install
npm run migrate            # apply Prisma migrations
npm run dev                # start the bot (long polling)
npm run worker             # in a second terminal: BullMQ worker

Locally docker compose runs only Postgres and Redis. The bot and worker run on the host via npm run dev / npm run worker so code changes pick up without rebuilds. The production app container lives in docker-compose.prod.yml for VPS deploys (docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d).

The HTTP /health endpoint is available at http://localhost:3001/health once the bot process is up.

Scripts

Command What it does
npm run dev Bot in watch mode (tsx).
npm run worker BullMQ worker in watch mode.
npm run build Type-check and emit to dist/.
npm start Run the compiled bot (dist/index.js).
npm run migrate prisma migrate dev.
npm run migrate:deploy prisma migrate deploy (production).
npm test Vitest.
npm run lint ESLint.
npm run format Prettier.

Project layout

src/
├── bot/        # grammY composers, command handlers, dialogs
├── domain/     # pure business logic (no I/O)
├── infra/      # adapters: db, telegram, queue, time
├── jobs/       # BullMQ producers and consumers
├── config/     # env parsing (zod), feature flags
├── i18n/       # string catalogs (ru only on v1)
├── lib/        # generic utilities
└── index.ts    # bot entrypoint
prisma/
└── schema.prisma
tests/
docker-compose.yml
.env.example