Skip to content

Introducing DollarBot: a smart Telegram Bot to track your spending and savings.

License

Notifications You must be signed in to change notification settings

Janhavi-23/budget_bot

 
 

Repository files navigation

License: MIT PEP8 Issues Open Issues Closed GitHub last commit Lines of code Repo-size file_count language_count Downloads Top Language Release codecov

💲 Budget Bot 💲

Are you a developer? 💻

Detailed Documentation For Developers and Future Contributors

What is Budget Bot?

BudgetBot💲 is a user-friendly Telegram bot designed to simplify your budgeting process and help you manage your finances.
With intuitive in-chat commands, BudgetBot allows you to effortlessly set and customize your budget, track expenses, add income from various sources, and even predict your next month's budget based on current spending trends.


Why use Budget Bot?

  • Easy Budgeting💼: Set and update your budget with simple commands tailored to your financial preferences
  • Expense Tracking 📅: Record and categorize your expenses, providing a detailed summary of your spending history
  • Income Management💵: Add income from different sources and monitor your financial inflow effortlessly
  • Graphical Analytics📈: Visualize your spending trends through expressive graphs, gaining insights into your financial habits
  • Budget Prediction🔮: Utilize the bot's analytical capabilities to predict your future budget, ensuring financial planning accuracy
  • PDF Reports📄: Generate clear and informative PDF reports of your spending history and analytics for easy reference
  • Recurring Expenses🔁: Seamlessly add recurring expenses to enhance the accuracy of your budgeting
  • Goal Setting🎯: Set savings goals for specific categories, fostering a proactive approach to financial planning

Demo

Demo Video -> [https://www.youtube.com/watch?v=3-w7-B_R0c4]

What's new?

Enhancements

We've considerably extended this project to make using Budget Bot easy and engaging.

  • Expressive Graphs📊: Engaging visual representations of your financial data for better understanding.
  • Budget Prediction🤑: Anticipate your budget for the upcoming month based on your current expenditure patterns.
  • Clearer PDF Reports📈: Improved documentation with more detailed and informative PDF reports for effective analysis.
  • Recurring Expenses🔁: Now you can effortlessly add recurring expenses, ensuring a more comprehensive budget.
  • Enhanced Budget Creation🔄: Updated features for creating, updating, and deleting budgets, providing greater flexibility.
  • Integrated OpenAI API🚀: Receive tips on efficient expense management and enhanced analysis from an AI Advisor.

Check this documentation out for an in-depth depiction of our changes. :)

Installation and Setup

Pre-requisite: The Telegram Desktop App

Since BudgetBot is built on top of Telegram, you'll first need:

  1. Download the Telegram Desktop Application https://desktop.telegram.org/ https://desktop.telegram.org/
  2. Create a Telegram account or Sign in.

Open up your terminal and let's get started:

MacOS / Ubuntu Users

  1. Clone this repository to your local system.
   git clone https://github.com/deepr41/budget_bot/
  1. Start a terminal session in the directory where the project has been cloned. Run the following commands and follow the instructions on-screen to complete the installation.
  chmod a+x setup.sh
  bash setup.sh

There, all done!

The installation is easy for MacOS or on UNIX terminals.

Windows

With Windows, you'll need to use a platform to execute UNIX-like commands in order to execute the setup.sh bash script. Once in the platform, use the steps in the MacOS/Unix Section above to setup BudgetBot.

We've used Cygwin, but there are more options like WSL that you can explore.

Additionally, find more hints on Cygwin installation here.

Running BudgetBot:

Once you've executed setup.sh, and all dependencies have been installed, you can start running BudgetBot by following these instructions.

  1. Open the Telegram Desktop Application and sign in. Once inside Telegram, search for "BotFather". Click on "Start", and enter the following command:
  /newbot
  1. Follow the instructions on screen and choose a name for your bot (e.g., budgetbot). After this, select a UNIQUE username for your bot that ends with "bot", for example: budgetbot_<your_nickname>.

  2. BotFather will now confirm the creation of your bot and provide a TOKEN to access the HTTP API - copy and save this token for future use. Make sure you save this token– don't lose it!

  3. In the repo directory (where you cloned it), run these commands.

(a) grant execution access to a bash script

chmod a+x run.sh

(b) execute the run.sh bash script to start BudgetBot

MacOS / Unix
   bash run.sh
Windows
   ./run.sh

Note: It will ask you to paste the API token you received from Telegram while creating your bot (Step 3), so keep that handy. A successful run will generate a message on your terminal that says "TeleBot: Started polling."

  1. In the Telegram app, search for your newly created bot by entering your UNIQUE username and open the bot you created.

  2. Now, on Telegram, enter the "/start" or "menu" command, and you are all set to track your expenses!

Run Automatically at Startup

To run the script automatically at startup / reboot, simply add the .run_forever.sh script to your .bashrc file, which executes whenever you reboot your system. Click here for help adding to .bashrc files.

How to Use

Here's a quick overview of how each of the commands work. Simply enter /<command_name> into the Telegram chat and watch as the magic happens!

/menu: Display commands with their descriptions.

/help: Display the list of commands.

/pdf: Save history as PDF.

/add: This option is for adding your expenses

  1. It will give you the list of categories to choose from.
  2. You will be prompted to enter the amount corresponding to your spending
    3.The message will be prompted to notify the addition of your expense with the amount,date, time and category

/analytics: This option gives user a graphical representation of their expenditures

You will get an option to choose the type of data you want to see.

/predict: This option analyzes your recorded spendings and gives you a budget that will accommodate for them.

/history: This option is to give you the detailed summary of your expenditure with Date, time ,category and amount. A quick lookup into your spendings

/delete: This option is to Clear/Erase all your records

/edit: This option helps you to go back and correct/update the missing details

  1. It will give you the list of your expenses you wish to edit
  2. It will let you change the specific field based on your requirements like amount/date/category

/budget: This option is to set/update/delete the budget.

  1. The Add/update category is to set the new budget or update the existing budget
  2. The view category gives the detail if budget is exceeding or in limit with the difference amount
  3. The delete category allows to delete the budget and start afresh!

/income: This option is to provide income from different sources.

/Monthly savings: This option comes under budget type and lets you set a savings goal for a month.

Future Scope

  • Sharing expenses
  • Windows specific setup scripts
  • Adding notes section while recording expenses
  • Making BudgetBot respond to casual conversation like 'Hi' and 'Bye'
  • Add budget items through OpenAI API

Acknowledgements

  • We extend our heartfelt gratitude to Prof. Dr. Timothy Menzie for affording us the invaluable opportunity to delve into the realm of software building, fostering new skills, and navigating the development process throughout the project.

  • A warm and appreciative thank you is extended to the Teaching Assistants for their unwavering support.

  • Our sincere thanks are also extended to the previous team for providing a comprehensive ReadMe and detailed documentation, which has proven instrumental in our understanding and progress 😊.

  • Lastly, a special acknowledgment goes to the Telegram bot, accessible at python-telegram-bot, for its major contribution to our project.

Contributors


Deepak Rajendran

Shafa Hassan


Janhavi Pendse


Deep Patel

About

Introducing DollarBot: a smart Telegram Bot to track your spending and savings.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.4%
  • Shell 1.1%
  • Dockerfile 0.5%