I’ve never liked the fact that many apps track all of your personal data and use it to serve you all kinds of ads and feed their large big data algorithms with data about your spending and browsing habits. Enter a new budget tracker written by yours truly. The goals are as follows:
- Must be lightweight
- Support basic csv formats directly from bank or credit card statements
- Uses NodeJS (for personal learning)
- Uses Python Pandas library (for learning and development – also because it supports great data manipulation functions)
- Uses MongoDB or SQLite
- Supports tagging of expenses by type
- Can do some recognition of common expenses (i.e. recurring expenses like subscriptions)
Potential future stuff:
- Track habits and report on what you’re spending your money on
- Make suggestions on what you need to cut back on
- Support a “saving up” feature. Figure out a dollar amount to put away for a month and have goal setting feature to predict future spending habits
- Dockerize application for easy deployment
Architecture:
Let’s talk architecture…boring stuff ;). The idea for the initial design is 3 tables: expenses, expense sources, and users. Let’s talk schema…
The first thing to think about is where the expenses are coming from. How many expenses are we going to aggregate and from where? For starters, we’ll make a table that has all of the expense sources.
Expense Source Name | Description | Expense Source UID |
My Bank USA | Bank Account Expenses | 5ef3e862-abdd-4e05-b45d-4d6a437ce5de |
North American Express | Main credit card | ec676c66-2a63-4c29-b682-b93beeea91c5 |
In this Expense Sources table, you’ll see we have a couple of sources: a bank and a credit card. The idea is that someone can easily add new expenses manually and tag them to the correct expense source easily. You could also bulk import expenses from csv such as from a credit card company and upon import, tag the correct source.
Next up is the expenses table. In here, we’ll define the expenses themselves. You can see there’s a column for “expense_uid_source”. This will match up with the credit card, bank account, etc where the expense is linked. I’ve also added tags where one can link the common expenses together by expense type. Eating out too much? link it as “eating out”, and easily track how often you eat out. Comments have been added as well for clarifications.
expense_date | expense_amount | expense_uid | expense_name | tags | user_id | comments | linked_expenses | expense_uid_source |
8/9/2022 | $12.00 | fa90d34d-bd93-4a3e-bd32-92c739548ac5 | Taco Bell | eating out | fa90d34d-bd93-4a3e-bd32-92c739548ac5 | late night snack 🙂 | ec676c66-2a63-4c29-b682-b93beeea91c5 | |
8/1/2022 | $1,200.00 | 5afa3bc7-c870-40ac-8d86-2c92a02c91f5 | Rent Company | monthly,recurring | fa90d34d-bd93-4a3e-bd32-92c739548ac5 | monthly rent | 5ef3e862-abdd-4e05-b45d-4d6a437ce5de | |
8/1/2022 | $40.00 | 3f8be5b8-85e3-4c0f-b824-b1d2c2e8b5c9 | Electric Company INC | monthly | fa90d34d-bd93-4a3e-bd32-92c739548ac5 | monthly electric bill | ec676c66-2a63-4c29-b682-b93beeea91c5 | |
8/1/2022 | $30.00 | 9665a182-c870-4d7d-bced-876ce04f56f3 | Gym Membership | monthly,recurring | 5afa3bc7-c870-40ac-8d86-2c92a02c91f5 | monthly gym membership | ec676c66-2a63-4c29-b682-b93beeea91c5 | |
8/4/2022 | $115.00 | 9fd927df-a239-4d5d-bf05-94d5ffe5238a | Grocery Store | weekly | 5afa3bc7-c870-40ac-8d86-2c92a02c91f5 | groceries | ec676c66-2a63-4c29-b682-b93beeea91c5 |
Last is the profiles table. This table is very basic and simply will allow expenses to be tied to a person. This allows you to figure out whose card or bank account is being tracked. As I’m writing this, I think that it would be good to have a “shared” option for stuff like rent, electric bill, etc that would be shared between a spouse or girlfriend/boyfriend, etc.
uid | username | first_name | last_name |
fa90d34d-bd93-4a3e-bd32-92c739548ac5 | brandon | Brandon | Jameson |
5afa3bc7-c870-40ac-8d86-2c92a02c91f5 | user1 | User | One |
3f8be5b8-85e3-4c0f-b824-b1d2c2e8b5c9 | user2 | User | Two |
9665a182-c870-4d7d-bced-876ce04f56f3 | user3 | User | Three |
9fd927df-a239-4d5d-bf05-94d5ffe5238a | user4 | User | Four |
This seems like a good start. Next, we’ll try tackle front end ideas, method for import, and key features.