TrackMyDollar_video.1.mp4
This video shows only the new features and enhancement of some older features. All the other features from Project 3 are working as it is.
TrackMyDollar is an easy-to-use Telegram Bot that assists you in recording your daily expenses on a local system without any hassle With simple commands, this bot allows you to:
- Add/Record a new spending
- Show the sum of your expenditure for the current day/month
- Display your spending history
- Clear/Erase all your records
- Edit/Change any spending details if you wish to
- Add a recurring expense
- User can add a new category and delete an existing category
- User can see the budget value for the total expense
- Added pie charts, bar graphs with and without budget lines
- Scan receipts using AI and add new transactions
- Send and Email to themselves with spend analysis using AI and spend graphs
- Export expenses and income to CSV with pivots and charts
- Deployment on GCP
- Scan Receipt: Use AI to extract the amount, date and category from any image of a receipt and add it to the transactions.
- Email Transaction History: Users can request their complete transaction history with graphs via email for easy access and record-keeping. Users get an analysis about their spends using AI.
- CSV Transaction History Extraction: Users can download their transaction history in CSV format, providing a versatile data export option for analysis along with charts and images.
- GitHub Actions Automation: Automated testing, code formatting, and syntax checks have been implemented through Github Actions. A minimum 80% code coverage is required for successful builds, ensuring code quality and testing standards are maintained.
Please refer to the issue list available here to see what more can be done to make MyDollarBot better. Please refer to the MyDollarBot project present here to have a look at the tasks done or in progress
Follow these instructions to set up the TrackMyDollar BOTGo on your local system in a few minutes.
- Open a terminal.
- Clone this repository to your local system:
git clone https://github.com/CSC510SEFALL2024/MyDollarBot-BOTGo/tree/main
- Navigate to the project directory where the repository was cloned.
- Install the required dependencies by running:
pip install -r requirements.txt
- Open Telegram and search for "BotFather".
- Click "Start" and enter the following command:
/newbot
- Follow the instructions to:
- Name your bot.
- Choose a username ending with "bot".
- Copy the token BotFather provides for accessing the HTTP API.
- Create a user.properties in the repository folder.
touch user.properties
- Add the api key from telegram in the user.properties file
api_token=<your_api_token>
- Go to the Gemini Developer Console and log in or create an account.
- Navigate to the API section and select Create New Project.
- Name your project and select the appropriate settings for API access.
- Once the project is created, go to the API Keys section within your project dashboard.
- Generate a new API key and secret. Make sure to note down the key and secret as they will only be shown once.
- Open the
user.propertiesfile in the project directory and add the Gemini API key and secret as follows:api_token=<your_telegram_api_token> gemini_api_key=<your_gemini_api_key>
- From the project directory, execute the following command:
(Or use bash run.sh if needed. If you're on Mac or Linux, you may need to run chmod +x run.sh first.) A successful run will generate a terminal message: "TeleBot: Started polling."
Copy code ./run.sh
- In Telegram, search for your bot using the username you created.
- Open the bot and type the command:
/start
You are now ready to track your expenses with TrackMyDollar BOTGo!
We use pytest to perform testing on all unit tests together. The command needs to be run from the home directory of the project. The command is:
python -m pytest test/
Code coverage is part of the build. Every time new code is pushed to the repository, the build is run, and along with it, code coverage is computed. This can be viewed by selecting the build, and then choosing the codecov pop-up on hover.
Locally, we use the coverage package in python for code coverage. The commands to check code coverage in python are as follows:
coverage run -m pytest test/
coverage report
Please note: A coverage below 80% will cause the build to fail.
Checkout what all actions you can perform in BotGo
- Enter the
/menucommand. - A list of commands with their description will be displayed.
I want to increase/decrease my monthly budget.
- Enter the
/budgetcommand - Following this user can add/update his/her budget, view current budget, delete the budget, or review per transaction maximum spend limit
I just spent money and want to mark it as a transaction!
- Enter the
/add_expensecommand - Click on the category to add
- Type in the amount spent
- Click on the date of the transaction
- Select if you want to upload a receipt
- Finally, your transaction will be recoded
I just earned some money and want to mark it as a transaction!
- Enter the
/add_incomecommand - Click on the category to add
- Type in the amount earned
- Click on the date of the transaction
- Select if you want to upload a receipt
- Finally, your transaction will be recoded
Oh no! I entered a transaction but want to delete it!
- Enter the
/deletecommand - This will delete all the transactions made so far.
Oh no! I entered a transaction but entered the wrong category!
- Enter the
/editcommand - Specify the date, category, and value of the transaction
- Specify what part of the transaction to edit (either date, category, or value)
- Enter in a new value
I want to add transactions from a CSV my bank gave me, and visalize my spendings
- Drag the .csv file into the telegram chat according to the format provided, and press send
- For each transaction, classify the category
- The application will remember these mappings
I want a CSV file of all my transactions.
- Make sure you have a transaction history.
- Enter the
/extractcommand. - A CSV file will be sent with your history.
I want to convert my total daily or monthly expenditure in a different currency.
- Enter the
/displayCurrencycommand - Next, Choose your currency from the options
- Choose from the category of day or month
- You will get the converted price in that currency
I want to send myself an email for the monthly expenditure
- Make sure you have a transaction history.
- Enter the
/sendEmailcommand. - Type the intended email address
- You will get an email with the history file as attachment.
- Along with the attachment you will get spend analysis using AI in natural language with improved format and graphs.
You can get a second opinion on your spendings by chatting with integrated AI.
- Enter the
/chatcommand. - You will be welcomed by the AI and since your history is already available to it you can ask questions regarding your financial questions
- enter
exitto stop the chat.
You can get a summary of your transactions in PDF format.
- Enter the
/pdfcommand. - Select the category that you want in the PDF history.
- Select a start and end date for the pdf output
- your PDF history will be created and ready to download.
You can get a summary of your transactions in CSV format.
- Enter the
/csvcommand. - Select the category that you want in the CSV history.
- Select a start and end date for the csv output
- your CSV history will be created and ready to download with graphs and images.
You can add transactions by scanning images of your receipts using AI.
- Enter the
/scan_receiptcommand. - Upload an image of your receipt.
- Gemini AI will scan this image and upload the transaction to your history.
I have to add an expense will be repeated in the future
- Enter the
/add_recurringcommand. - Select the category
- Enter the amount
- Enter for how many months the expense will be there.
- Your recurring expense will be added.
Get an estimate of your spending for next day or month
- Enter the
/estimatecommand. - Select from following
- Next Day
- Next Month
- An Estimate will be provided
Get a tabular and graphical representation of your transactions
- Enter the
/displaycommand. - Select from following category
- Day
- Month
- Tabulated data will be provided
- Following options can be chosen for graphical representation.
- Bar with budget
- Pie
- Bar without budget
- Graph will be displayed according to choice.
Display all receipts for the day
- Enter the
/receiptcommand. - Enter the date
(YYYY-MM-DD or YYYYMMDD)in this format to get receipt for that particular day.
Add/Delete/Show custom categories
- Enter the
/categorycommand. - Select an option between expense and income in which you want to see the category
- You can perform the following operations.
- Show Categories which will display the existing category
- Add a new category
- Delete a category
You can download and install the Telegram desktop application for your system from the following site: https://desktop.telegram.org/
Title:'Track My Dollar'
Version: '4.5'
Authors(Iteration 6):
Anurag Gorkar |
Aryan Iguva |
Harsh Vora |
Description: 'An easy to use Telegram Bot to track everyday expenses'
Authors(Iteration 5):'Jayesh, Harsh, Sagar, Soham'
Authors(Iteration 4):'Anuj, Bhavesh, Jash, Vaibhavi'
Authors(Iteration 3):'Vraj, Alex, Leo, Prithvish, Seeya'
Authors(Iteration 2):'Athithya, Subramanian, Ashok, Zunaid, Rithik'
Authors(Iteration 1):'Dev, Prakruthi, Radhika, Rohan, Sunidhi'

