Inventory app with:
- React/Vite frontend
- Supabase database
- Python-only Telegram bot integration
npm install
npm run devTelegram integration is implemented only in python/telegram_bot.
cd python/telegram_bot
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
uvicorn app:app --host 0.0.0.0 --port 8000 --reloadSUPABASE_URLSUPABASE_SERVICE_ROLE_KEYTELEGRAM_BOT_TOKENTELEGRAM_WEBHOOK_SECRETSUPABASE_EVENT_SECRET
Apply:
supabase/migrations/20260217_telegram_bot_setup.sqlsupabase/migrations/20260218_telegram_event_triggers.sql
Set DB settings used by trigger callbacks:
alter database postgres set "app.settings.python_webhook_url" = 'https://<your-python-host>';
alter database postgres set "app.settings.supabase_event_secret" = '<shared-secret>';Set webhook to Python endpoint:
curl -X POST "https://api.telegram.org/bot<TELEGRAM_BOT_TOKEN>/setWebhook" \
-H "Content-Type: application/json" \
-d "{\"url\":\"https://<your-python-host>/telegram/webhook\",\"secret_token\":\"<TELEGRAM_WEBHOOK_SECRET>\"}"These no longer exist:
POST /api/telegram-webhookPOST /api/telegram-notify?action=*