Private Memory OS

Remember your life through Telegram.

This app is built as a private memory bot for a single Telegram channel. Post updates to the channel, let the bot archive them in a database, then query your own history with summaries, search, and daily recaps.

StackNext.js App Router, TypeScript, Prisma, Vercel Functions
StorageSQLite for local development, Postgres for production
SecurityWebhook secret validation, owner-only commands, cron auth
Telegram ingestionChannel posts and edits flow into a typed webhook route, get normalized, tagged, scored, and stored with the raw Telegram payload for debugging.
Searchable memoryOwner-only bot commands surface recent notes, rolling summaries, simple text search, and compact stats without adding a heavy Telegram framework.
Daily digestA Vercel cron route rolls up the last 24 hours into deterministic prose, saves it in the database, and can send it back to your private Telegram chat.

Core endpoints

The public surface stays intentionally small. Telegram and Vercel call the API routes below, while setup and admin operations live in the accompanying scripts documented in the README.

POST/api/telegram/webhookReceives channel posts, edits, and owner commands from Telegram.
GET/api/cron/daily-summarySecured cron route for daily rollups and optional owner delivery.
GET/api/healthBasic runtime and database health probe for Vercel or external uptime checks.