A Telegram bot built with Deno and grammY to help track daily expenses.
- 💰 Track expenses with categories
- 📊 Generate reports (daily, weekly, monthly, yearly)
- 📈 Visualize spending with charts
- 👤 Personal expense tracking
- 💾 Data persistence using Deno KV
- ⏰ Daily expense reminders
- 💵 Monthly budget planning and alerts
- 🔄 Recurring expense automation
- Deno - Runtime environment
- grammY - Telegram Bot framework
- Deno KV - Key-value database
- QuickChart - Chart generation
- Clone the repository
git clone https://github.com/yourusername/marbot.git
cd marbot- Create a
env.shfile:
export BOT_TOKEN=your_telegram_bot_token- Run the bot:
make dev- Install Deno Deploy CLI:
deno install -gArf jsr:@deno/deployctl- Login to Deno Deploy:
deployctl login-
Create new project on Deno Deploy
-
Configure environment variables:
- Go to project settings
- Add BOT_TOKEN with your Telegram bot token
-
Deploy your bot:
deployctl deploy --project=your-project-name --entrypoint=server.ts --prod- Set up Telegram Webhook:
- Replace YOUR_BOT_TOKEN and YOUR_DENO_DEPLOY_URL
curl -X POST https://api.telegram.org/bot<BOT_TOKEN>/setWebhook?url=<YOUR_DENO_DEPLOY_URL>/<BOT_TOKEN>/start- Start the bot/menu- Show main menu/catat- Record new expense/laporan- View expense reports/export- Export expense data to CSV
/catat category amount note
# or use free text
makan 50000 note
Example:
/catat makan 50000 lunch with friends
Multiple expenses:
/catat makan 50000 lunch, transport 25000 grab