My networth Django application
Find a file
2026-08-19 12:04:59 +10:00
data Made the database configuration more generic and updated configuration to use django-environ as part of my switch from Sqlite to PostgreSQL 2026-07-25 18:00:50 +10:00
docker Further changes to allow for multiple database back ends 2026-07-31 17:09:57 +10:00
docs Configuration updates to allow for working behind a reverse proxy 2026-08-19 12:04:59 +10:00
networth_web Configuration updates to allow for working behind a reverse proxy 2026-08-19 12:04:59 +10:00
.env.example Configuration updates to allow for working behind a reverse proxy 2026-08-19 12:04:59 +10:00
.gitignore Removing more accidental additions, this time it's CSV files 2026-07-24 15:45:47 +10:00
AGENTS.md Made the docker compose file use .env and updated deployment documentation accordingly 2026-08-05 09:24:41 +10:00
docker-compose.yml Made the docker compose file use .env and updated deployment documentation accordingly 2026-08-05 09:24:41 +10:00
Dockerfile Further changes to allow for multiple database back ends 2026-07-31 17:09:57 +10:00
dump-balances.py Further changes to allow for multiple database back ends 2026-07-31 17:09:57 +10:00
dump-periods.py Further changes to allow for multiple database back ends 2026-07-31 17:09:57 +10:00
Justfile Made the database configuration more generic and updated configuration to use django-environ as part of my switch from Sqlite to PostgreSQL 2026-07-25 18:00:50 +10:00
LICENSE Initial commit 2026-07-22 20:29:31 +10:00
networth_ddl.sql Getting to the initial application state 2026-07-22 20:54:54 +10:00
populate-database.py Made the database configuration more generic and updated configuration to use django-environ as part of my switch from Sqlite to PostgreSQL 2026-07-25 18:00:50 +10:00
pyproject.toml Made the database configuration more generic and updated configuration to use django-environ as part of my switch from Sqlite to PostgreSQL 2026-07-25 18:00:50 +10:00
README.md Getting to the initial application state 2026-07-22 20:54:54 +10:00
uv.lock Made the database configuration more generic and updated configuration to use django-environ as part of my switch from Sqlite to PostgreSQL 2026-07-25 18:00:50 +10:00

Net Worth

I'm building a simple database backed web application to keep track of my Net Worth. The purpose of this application is to track the value of my investments over time and to provide analysis of this data using suitable graphs and dashboards.

This will/should be made obsolete if I ever get my Gnucash clone working - see ``~/Work/code/personal_wealth`

Data Model

See docs/data-model.md for the canonical database-agnostic definition. The SQL source of truth is networth_ddl.sql.

Period

This is a day, week, month, quarter or year. Should act like a dimension in a star schema with the difference that I want to be able to choose which level to assign values (see balances) to.

The data will be organised in a tree like structure. Each record can have one (and only one) parent. Any record without a parent is the top of a hierarchy. Within a year we can have quarters, within quarters we have months and days.

Weeks are a seperate hierarchy, each one is in a year but because they can span months and/or quarters we keep them seperate.

This table is static and should be populated using a script. The script will be run once for each year to create the appropriate week, month, quarter and year records. Daily records will only be created as needed.

The periods table should be part of the seed data used to create a new database containing weeks, months and quarters for the current calendar year.

Account

Accounts will have a type, one of

  • Bank account
  • Stock holding
  • Investment account
  • Credit Card
  • Loan
  • Mortgage

These account types have a further attribute indicating if they are a credit or debit type of account.

The account types table data should be part of the seed data used to create a new database

Balance

Foreign keys to both account and period. For stock holdings, quantity holds the number of units held.

Balances should be editable in the application, with users able to add or amend balance records. If an account is a stock holding we should be able to run a script to fetch and update the stock price from the internet. This script should either be run periodicially or invoked from the application.

Application

A simple, web based application. The main purpose (and the initial view) is to view net worth (sum of all balances) over time, with a switch to choose between different period types and ranges. The initial state of this dashboard should show sums of debits and credits by week for each of the last 2 months.

Reference data (accounts, account types, and periods) is managed through the Django Admin interface at /admin/.

There will be utilities to

  • fetch the price for stocks to populate the balance for a stock holding. Do we keep the stock prices in a seperate table? The utility should be able to fetch the current price for a stock or to get prices for a historical range and should upsert the prices so it can be used to fill any gaps in historical prices.
  • fetch balances for bank accounts from bank APIs (probably only Up Bank for now)