Skip to content

A Telegram bot built with Deno and grammY to help track daily expenses.

License

Notifications You must be signed in to change notification settings

wildandhya/marbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Bot Expense Tracker

A Telegram bot built with Deno and grammY to help track daily expenses.

🌟 Features

  • 💰 Track expenses with categories
  • 📊 Generate reports (daily, weekly, monthly, yearly)
  • 📈 Visualize spending with charts
  • 👤 Personal expense tracking
  • 💾 Data persistence using Deno KV

🔜 Upcoming Features

  • ⏰ Daily expense reminders
  • 💵 Monthly budget planning and alerts
  • 🔄 Recurring expense automation

🛠️ Tech Stack

🚀 Getting Started

Local Development

  1. Clone the repository
git clone https://github.com/yourusername/marbot.git
cd marbot
  1. Create a env.sh file:
export BOT_TOKEN=your_telegram_bot_token
  1. Run the bot:
make dev

Production Deployment

  1. Install Deno Deploy CLI:
deno install -gArf jsr:@deno/deployctl
  1. Login to Deno Deploy:
deployctl login
  1. Create new project on Deno Deploy

  2. Configure environment variables:

    • Go to project settings
    • Add BOT_TOKEN with your Telegram bot token
  3. Deploy your bot:

deployctl deploy --project=your-project-name --entrypoint=server.ts --prod
  1. 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>

📝 Commands

  • /start - Start the bot
  • /menu - Show main menu
  • /catat - Record new expense
  • /laporan - View expense reports
  • /export - Export expense data to CSV

📊 Expense Format

/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

About

A Telegram bot built with Deno and grammY to help track daily expenses.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published