GithubHelp home page GithubHelp logo

eddyharrington / tendie-tracker Goto Github PK

View Code? Open in Web Editor NEW
150.0 10.0 52.0 5.29 MB

A web app for tracking expenses and budgets

Home Page: https://tendie-tracker.herokuapp.com

License: MIT License

Python 40.03% CSS 1.12% HTML 38.20% JavaScript 20.64% Procfile 0.01%
expense-tracker budgeting personal-finances cs50

tendie-tracker's Introduction

Tendie-Tracker

A (deprecated) web app for tracking expenses and budgets.

⛔ This project is currently DEPRECATED and no longer maintained.

What are tendies? Basically, money. Internet people call money 'tendies' and it's a word play on 'tender' (i.e. legal currency) and chicken tenders the food ¯\_(ツ)_/¯

Features

  • Quick and bulk expensing
  • Budget creation and automatic tracking of expenses per budget
  • Custom spend categories
  • Dashboard with dynamic reporting
  • Detailed reports that break down spending
  • Add additional payers for tracking expenses across multiple people
  • Export your data directly into raw, CSV, and Excel
  • Responsive design - compatible with all major browsers and devices

Built with

Demo

Dashboard

Expensing

Budgets

Reports

Run it locally (written for Windows and VSCode)

  1. Create a directory and clone the repo in it:
git clone https://github.com/eddyharrington/Tendie-Tracker
  1. Create your virtual environment:
python -m venv env
  1. Activate your virtual environment:
env\Scripts\activate
  1. Install the dependencies:
pip install -r requirements.txt
  1. Create the DB in Postgres (schema in repo here)

  2. Set your environment variables in .env file (otherwise hard code the string app.secret_key in app.py and engine in all of the .py files):

# App variable
SECRET_KEY=someRandomStringOfText

# DB variable
DATABASE_URL=postgres://{user}:{password}@{hostname}:{port}/{database-name}
  1. Build and run the Flask app in VSCode

Discussion

I started working on this in March 2020 as part of my CS50 final project. My main goal was to replace an Excel file I was using for tracking expenses and originally this app had only 1 form and 2 or 3 pages on it. The pandemic gave me extra time to think and explore different technology so I ended up adding features that I was curious to learn about. Some of the other things I wanted to add and may work on at a later time include:

  • Tests
  • User intro / walk-through of the app
  • Improved budget tracking (i.e calculates if your weekly / monthly spending is on-track or not)
  • Dark theme
  • Suggested spend categories

tendie-tracker's People

Contributors

dependabot[bot] avatar eddyharrington avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tendie-tracker's Issues

Time frame options for budgets and income (monthly, annual)

Feature requests from CS50 Facebook group:

  1. Budget scenario: as a user who budgets month to month and has varying income/expense levels as a result, I want the ability to configure my budgets monthly instead of annually, so that budgets can be scoped smaller and tracked more closely.

  2. Income scenario: as a user with varying monthly income (e.g. freelancer), I want the ability to set income month to month instead of annually, so that weekly/monthly expenses can be tracked more clearly.

Budget UI - percentage decimals not rounding to 2 places

An issue was submitted anonymously via the footer feedback form:

Nice app! One very minor thing I encountered while poking around the site. I made a budget where groceries were 55% of my budget. When I review my budget, it says Groceries are 55.00000000000% of my budget. Looks really nicely polished, and has awesome functionality too!

Bug in Postgres DB Schema

'year' column is missing in SQL statement for creating 'budgets' table.

Corrected SQL statement:

CREATE TABLE IF NOT EXISTS budgets (
id serial PRIMARY KEY,
name TEXT NOT NULL,
amount REAL,
year INTEGER NOT NULL,
user_id INTEGER NOT NULL,
CONSTRAINT budgets_user_id_fkey FOREIGN KEY (user_id)
REFERENCES users (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION
);

Bug Source:
https://github.com/eddyharrington/Tendie-Tracker/blob/master/dbCreateStatements-Postgres.txt

Dashboard issues after year changed from 2020 to 2021

Issue # Location Issue Details
1 Dashboard - Your Expenses 2020 Expenses card - title of card needs to be dynamic to current year Root cause: '2020' is static in the HTML

Location: index.html, line 101
2 Dashboard - Your Expenses Monthly Expenses card - incorrect sum Root cause: SQL query sums all expenses in the current month only, which includes any year.

Location: tendie_dashboard.py, line 29
3 Dashboard - Your Expenses Weekly Expenses card - incorrect sum Root cause: same as issue 2

Location: tendie_dashboard.py, line 41
4 Dashboard - Weekly Spending Line graph has incorrect sums Root cause: same as issue 2

Location: tendie_dashboard.py, line 122
5 Dashboard - Monthly Spending Bar chart has incorrect sums / includes last years expenses Root cause: this chart is 'looking back 12 months' so it's including 2020 data in 2021 which is confusing. Also, its confusing because the same chart is in reports which is explicitly 'last 12 months'. Dashboard should ONLY show current calendar year spending.

Location: tendie_dashboard.py, line 154

Note: has a dependency on tendie_reports.py line 54
6 Dashboard - Spending Habits Bubble chart has incorrect sums / includes last years expenses Root cause: same as issue 5

Location: tendie_dashboard.py, line 173

Note: has a dependency on tendie_reports.py, line 60
7 Dashboard - Payer Spending Pie chart has incorrect sums / includes last year expenses Root cause: same as issue 5

Location: tendie_reports.py, line 146 and line 151
8 Dashboard - Last 5 Expenses Last 5 expenses are not ordered correctly Root cause: ordering by a text column with dates in format of MM/DD/YYYY orders by the largest month value first instead of the last inserted rows

Location: tendie_dashboard.py, line 52

Trying to make your app work

Hi Eddy!

I'm trying to make your app work locally without success. As I've tried to use a macbook, I have tried to modify your instructions.

The goal was to use an 'ad-free' expense tracker, and since I'm in India, I wanted to customize it to use the local currency.

I followed your instructions till step 4, but the create database part got me stuck.

I just ended up copy pasting your .txt file after running psql postgres and when I tried to run my app I got the following nasty error.

   Use a production WSGI server instead.
 * Debug mode: off
Traceback (most recent call last):
  File "/usr/local/anaconda3/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/anaconda3/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/flask/__main__.py", line 15, in <module>
    main(as_module=True)
  File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/flask/cli.py", line 967, in main
    cli.main(args=sys.argv[1:], prog_name="python -m flask" if as_module else None)
  File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/flask/cli.py", line 586, in main
    return super(FlaskGroup, self).main(*args, **kwargs)
  File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/click/decorators.py", line 73, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/flask/cli.py", line 848, in run_command
    app = DispatchingApp(info.load_app, use_eager_loading=eager_loading)
  File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/flask/cli.py", line 305, in __init__
    self._load_unlocked()
  File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/flask/cli.py", line 330, in _load_unlocked
    self._app = rv = self.loader()
  File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/flask/cli.py", line 392, in load_app
    app = locate_app(self, import_name, None, raise_if_not_found=False)
  File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/flask/cli.py", line 240, in locate_app
    __import__(module_name)
  File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/app.py", line 6, in <module>
    import tendie_dashboard
  File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/tendie_dashboard.py", line 3, in <module>
    import tendie_budgets
  File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/tendie_budgets.py", line 3, in <module>
    import tendie_categories
  File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/tendie_categories.py", line 10, in <module>
    engine = create_engine(os.getenv("DATABASE_URL"))
  File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/sqlalchemy/engine/__init__.py", line 479, in create_engine
    return strategy.create(*args, **kwargs)
  File "/Users/hargunoberoi/Desktop/expenses/Tendie-Tracker/env/lib/python3.8/site-packages/sqlalchemy/engine/strategies.py", line 56, in create
    plugins = u._instantiate_plugins(kwargs)
AttributeError: 'NoneType' object has no attribute '_instantiate_plugins'

I have created a .env file with your given code (but have not replaced user and password with anything since I don't know what to put, my db username is hargunoberoi and no password).

Any help would be appreciated, as you may be glad someone found your work useful. :)

UPDATE:

I got it to work somehow! Still learning about databases.

Different colors per category on the 'Spending Categories Report' chart

Suggested enhancement to improve the chart readability / quality by /u/cldmello:

When I got to Reports -> Spending Categories Report, I see that all the categories are having the same bubble color. Maybe you can try to display each category in a different color. It will look better.

Currently, the chart uses the same color set for all of the bubbles that represent a category (code).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.