Skip to content

alsol/budgetosaurus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Budgetosaurus Rex Telegram Bot

No, it's not the real logo lol

🦖 Overview

Budgetosaurus Rex is a Telegram bot for personal finance management.
This bot is designed to help you keep track of your finances in a fun and easy way.

💬 Commands and Scenarios

Bot supports the following commands:

  • /start: Say hello and register yourself.
  • {amount} {description}: Log a transaction, whether it's money spent or earned.
  • /tips: Get a random tip to help you manage your money better.
  • /expenses: See a list of your expenses over a chosen period (Day, Week, Month).
  • /report: Get a pie chart summary of your expenses and income for a chosen period (Day, Week, Month).

/start - Register User

sequenceDiagram
    participant User
    participant Bot

    User->>Bot: /start
    Bot-->>User: Roar! Welcome to Budgetosaurus Rex! I'm your friendly Budgetosaurus, here to help you manage your dino-dollars. What would you like to do today?
Loading

Transaction Tracking

sequenceDiagram
    participant User
    participant Bot

    User->>Bot: {amount} {description}
    Bot-->>User: Choose a category.
    User->>Bot: {category}
    Bot-->>User: Transaction recorded
Loading

/expenses - List Expenses

sequenceDiagram
    participant User
    participant Bot

    User->>Bot: /expenses
    Bot-->>User: Choose a range (Day, Week, Month)
    User->>Bot: {range}
    Bot-->>User: Here is the list of your spending for {range}: - {date}: • {expense}
Loading

/report - Expense Report

sequenceDiagram
    participant User
    participant Bot

    User->>Bot: /report
    Bot-->>User: Choose a range (Day, Week, Month)
    User->>Bot: {range}
    Bot-->>User: [Pie Chart with summary for the chosen range]
Loading

/tips - Financial Tips

sequenceDiagram
    participant User
    participant Bot

    User->>Bot: /tips
    Bot-->>User: [Random Financial Tip]
Loading

▶️ Running it Locally

You need to install the required middleware first:

python3 -m venv ./pyenv \ 
  && source ./pyenv/bin/activate \
  && pip3 install -r ./python/requirements.txt

Make sure you have the postgres instance running on your device, then run the following command:

export API_TOKEN=<your tg bot api token>
export DB_USER=<your db user name>
export DB_PASSWORD=<your db user pass>
sbt run

The easy way is to start all-in-one using docker-compose:

export API_TOKEN=<your api token>
export DB_USER=<your db user name>
export DB_PASSWORD=<your db user pass>
sbt docker:publishLocal && docker-compose up

👩‍💼 License

This project is licensed under the Apache 2.0 License