L-GEVITY
L-GEVITY is het platform waar jij jouw huidige en toekomstige gezondheid kunt meten en verbeteren met gerichte leefstijlaanpassingen op basis van bloedwaarden, fitnesstests, biomarkers en slimme algor
翻譯準備中
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Calorie tracking bot in Telegram.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗A Telegram bot for conversational calorie tracking with AI-powered food estimation.
Describe what you ate in natural language, and TeleCal estimates the calories and protein using AI (OpenAI, Anthropic, or Google Gemini).
/ with a Request access button that deep-links into the bot/app# Clone the repository
git clone https://github.com/yourusername/telecal.git
cd telecal
# Install dependencies
bun install
# Copy environment template
cp .env.example .env
# Edit .env with your configuration
Edit .env with your settings:
# Required
TELEGRAM_BOT_TOKEN=your_bot_token
# Admin users (comma-separated Telegram IDs)
ADMIN_USERS=123456789
# AI Providers (at least one required)
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
GOOGLE_API_KEY=AIza...
# Web server for Mini App
APP_URL=http://localhost:3000
PORT=3000
# Feature flags
FEATURE_CACHING=true
FEATURE_LOCAL_FOOD_DB=false
# Development (with hot reload)
bun run dev
# Production
bun run start
| Command | Description |
|---|---|
/start | Welcome message and command list |
/log | Start logging food |
/today | View today's calories and protein |
/week | View past 7 days |
/month | View past 30 days |
/edit | Edit a logged entry |
/delete | Delete a logged entry |
/settings | Change AI provider, calorie and protein goals, reminders |
/pending | View entries awaiting AI processing |
/usage | View your own AI token usage |
/admin | Manage allowed users and access requests, view AI usage and cost, backfill protein (admin only) |
Food descriptions are sent to whichever AI provider the user has selected in
/settings (OpenAI, Anthropic, or Google) to estimate calories and protein.
The one-off /admin backfill-protein command sends the descriptions of items logged before protein tracking existed to the admin's selected provider, not each user's.
TeleCal disables server-side retention where the provider offers the option —
OpenAI calls are made with store: false, so requests are not kept in the
OpenAI organization's logs. Providers may still retain request content
separately for abuse monitoring under their own policies.
Calorie data itself is stored in TeleCal's local SQLite database.
TeleCal uses PostHog Cloud (US region) for error tracking and analytics. Decisions and reasoning are in ADR 0001. PostHog receives:
Users are identified by an HMAC-SHA256 of their Telegram ID, keyed with a
server-side secret (POSTHOG_ID_SECRET). Raw Telegram IDs, usernames and names
are never sent, and no person properties are set. Every event carries an
environment tag (production or development).
Meal text opt-out. /settings → Meal Text Sharing (on by default,
users.analytics_content) keeps a user's text out of PostHog: their
$ai_generation events drop $ai_input, $ai_output_choices and
$ai_error, and their error reports keep the error type and stack frames but
not the message. Token counts, cost and latency are still sent. Errors not
tied to a user (process-level crashes) are sent as they are.
Existing users were told with a one-time message (/admin announce-privacy);
/start and the landing page FAQ link to the same summary.
Deleting a user's data. On request, run /admin posthog-id <telegram_id>
to get the user's PostHog ID, then in PostHog open People, search for that
ID, and delete the person. Deleting a person also deletes their events.
/log to start a sessionsrc/web/public/ holds the landing page's images. To regenerate them (macOS, needs Google Chrome):
scripts/screenshots/ as shot-log, shot-today and shot-charts (any image format).bash scripts/build-landing-assets.sh. It renders og.png from scripts/og.html and writes 720 px JPEGs.src/web/public/.# Run all tests
bun test
# Run tests in a specific directory
bun test src/ai
# Run a specific test file
bun test src/db/repositories/users.test.ts
src/
├── index.ts # Entry point
├── config.ts # Environment configuration
├── bot/ # Telegram bot
│ ├── commands/ # Command handlers
│ ├── conversations/# Log flow state machine
│ └── middleware/ # Allowlist access control
├── ai/ # AI service layer
│ ├── service.ts # Provider abstraction
│ └── providers/ # OpenAI, Anthropic, Gemini
├── db/ # SQLite database
│ ├── schema.sql # Database schema
│ └── repositories/ # Data access layer
├── web/ # Landing page and Mini App web server
│ ├── server.ts # Bun HTTP server
│ ├── auth.ts # Telegram auth validation
│ ├── public/ # Landing page images (served at /assets/*)
│ └── views/ # landing.html, app.html
└── jobs/ # Background jobs
├── reminders.ts # Daily notifications
└── retry-pending.ts # Retry failed AI calls
MIT