Skip to content

CSC510-G35-Fall2022/SmartSpend2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SmartSpend

MIT license GitHub GitHub contributors DOI Platform Python CI coverage


Purpose

It is often difficult to keep track of spendings. There are ways to do it - keep spread sheets, notes, or write them down in a journal. However all of these options are too hectic when trying to quikcly add spendings. The main purpose of this project is to simplify that by having a telegram bot that organizes and keeps track of spendings for you! With Smart Spend it is possible to keep track of spending records and view the history in a seamless manner! Check out our project below.

Demo

final.demo.1.mp4

Why you should pick our project

Screen.Recording.2022-12-05.at.11.20.18.PM.mp4

About SmartSpend

SmartSpend 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
  • Set limits for your daily/montly/yearly expenses
  • Search the best deals for your purchase
  • Share/Settle your expense with other users
  • commands

Additions:

  • Fixed several bugs related to parsing and tracking.
  • Updated menu view to display slash commands when "/" is typed in telegram chat
    • commands
  • Refactored old code to suit updated structure.
    • Previously all of the code was in a single file with around 650 lines. This appeared messy and was hard to edit parts of the program.
    • Attempted one refactor method which can be seen in this branch. This method was too time consuming and required more of the codebase to be refactored.
    • Tried another refactor method, much faster, worked simpler, did not need to update more of the code base. This has been merged to main.
  • Moved away from Travis to GitHub actions for rolling builds.
  • Also added cancel feature, to abort an 'add' transaction at any point.
  • Feature -> Add 'limit_category' feature to work as an alarm when spending exceed preset limits.
    • Users can create limits on the existing categories, food, groceries, utilities, ...
    • commands
    • commands
    • When user adds an expense, limit categories, and all all three existing limits are checked.
    • commands
    • Ability to view limits for categories.
    • commands
  • Updated Feature display -> Graphics
    • Added matplotlib graphs to display to view individual categories spendings on a pie chart.
    • Graph
  • Updated Feature History -> Graphics
    • Added matplotlib graphs to let user see a bar graph of spending vs month.
    • Graph
  • Feature -> Add 'website' feature to give the user a link to a personalized website.
    • Created a website for the user to manage their expenses. The Telegram bot and the website work simultaneously and update in real time.
    • Website can add a new expense
    • Website can view all expense and filter/sort them
    • Website can view current limits and view accurate progress meters for category limits

Scalability Design

The following image shows a scalability Design described in detail, and a scalability diagram to visualize how the detail would work.

Installation guide

See INSTALL.md

Mini tutorial

  1. Menu: This command can be used by typing '/menu'. The bot will then display list of all commands.

commands

  1. Add: This command is used by typing '/add'. This command is used to add a spending record.
    Once the /add command is used, the bot gives various categories, like 'Food','Groceries','Miscellaneous' and so on, to choose from. Futheromore, the bot allows user to add a personalized category if it is not present in the options. Once the category is selected, then the bot asks the user to enter the amount to be recorded. After this the Bot gives an option to split with any other user, if 'Yes' is selected the other user will be informed and the transaction would be recorded, if 'No' is selected the transaction is recorded for the current user.

commands

commands

commands

  1. Display: This command is used by typing '/display'. This command is used to display the spending records for day.month or all spendings. Futhermore, the bot displays a Pie chart showing the spendings so that user can get a visual look at the spendings numbers.

commands

commands

  1. History: This command is used by typing '/history'. This command is used to display history of all the spending records. Futhermore, the bot displays a Bar graph showing the spendings over all the months, so that user can analyze the spendings.

commands

  1. Limits: This command is used by typing '/limit'. This command is used to set daily, monthly, yearly limits for user. Futhermore, this command also has a view limits feature that allows user to view limits.
  • Add a limit:

commands

commands

  • View limits:

commands

  1. Categorical Limits: This command is used by typing '/limitcategory'. This command is used to set monthly categorical limits for user. Furthermore, this command also has a view limits feature that allows user to see their monthly categorical limits.
  • Add a categorical limit:

commands

  • View all categorical limits:

commands

  1. Search: This command is used by typing '/search'. This program runs a web search on the specified query and provides the top 5 products together with their prices so that the user can compare them.

commands

  1. Website:

To view all expenses, click View Expenses. It will bring you to a page that looks like this.

  • To delete one expense, simply click on the number of the expense at the bottom.
  • To Delete all, click on the delete all button
  • To add an expense, click Add Expense. It will bring you to a page like this. Once you fill in the price and select a category, hit submit

  • to view limits, click on the Add/Change spending limits
  • It will bring you to a page like this.

    If you want to change the limit for something, just type the number in below that category and click set limit. The default is 100.

    Testing

    We are doing both automated and blackbox testing. The reason why our coverage is 23% is because that coverage person only measures coverage from the automated tests. The rest of the coverage is covered using black box tests. We used black box tests because we had to test the telegram API functionality which was only testable when the bot would be running through telegram. This made it impossible to test using automated testing which was why we used blackbox.

    Case Studies

    1. Tested smart spend bot code individually with all five of our members. Member 1 tested the following functionalities: add, delete, display . All of the functionalities work as intended. Last updated Dec 05 2022.
    2. Tested smart spend bot code individually with all five of our members. Member 2 tested the following functionalities: edit, history, limit. All of the functionalities work as intended. Last updated Dec 05 2022.
    3. Tested smart spend bot code individually with all five of our members. Member 3 tested the following functionalities: limit_cat, search. All of the functionalities work as intended. Last updated Dec 05 2022.
    4. Tested smart spend bot code individually with all five of our members. Member 4 tested the following functionalities: settle. All of the functionalities work as intended. Last updated Dec 05 2022.
    5. Tested smart spend bot code individually with all five of our members. Member 5 tested the following functionalities: start, website. All of the functionalities work as intended. Last updated Dec 05 2022.

    Funding

    Not a funded project, nor is funding necessary.

    Contributors

    This project has the following contributors:

    Contributor GitHub ID
    1 Cheerla, Sanjana Stoir
    2 Ganesh, Saail Gurunath SaailGanesh
    3 Pardeshi, Sourabh SourabhPardeshi
    4 Patel, Maya maya-dc-patel
    5 Xin, Vincent Culcheese

    Previous contributors: Authors:'Kaushik, Surya, Pradyumna, Harshitha, Aditi'

    Contact Form and Bug Report Form

    click here