Skip to content

s-shifat/home-finance

Repository files navigation

Home Finance

A nifty web app to keep track of my home's monthly expenses and some personal utility.

Tech stack

Developed and hosted on Raspberry Pi 4 with neovim as code editor.

Features

  • Multi account support for family members and shared payment information records for each bill
  • Monthly fixed bills records plus bill adjustments
  • Personal expenses records
  • Personal TODO list

Setup

  1. Clone this repository.

    git clone https://github.com/s-shifat/home-finance.git

    1.2. Create a virtual environment. I used virtualenv:

    # Navigate to project root.
    cd home-finance
    
    # Create virtual environment
    virtualenv venv
    
    # If you use Linux/Mac
    source venv/bin/activate
    
    # If you're in fish shell
    source venv/bin/activate.fish
    
    # If you use Windows powershell
    .\venv\Scripts\activate.ps1
  2. Install requirements:

    pip install -r requirements.txt
  3. To launch on local host:

    python manage.py runserver

... That's it!

Launch on Rasberry Pi

To launch on a Raspberry there are many ways. I followed this one:

  1. ssh into your pi.

  2. Make start.sh executable

    sudo chmod +x ./start.sh
  3. Edit your /etc/rc.local file.

    sudo vim /etc/rc.local

    The last satement in this file is exit 0. You will add the following line just above exit 0:

    bash absolute_path_to_start.sh &

    replace absolute_path_to_start with absolute path of start.sh in your rasberry pi. A reboot might be required after that.

Add Other Database

To configure other databases you can use creds directory. Here's an example to use PostgreSQL:

  1. Install and setup PostgreSQL in your system. I followed this guide. Make note of name, password, server and port.

  2. Create a copy of sqlite_db.py inside creds directory and rename it to something like postgresql_db.py.

  3. Now edit the file as following with your proper credentials:

MY_DB_CONFIG = {
    'ENGINE': 'django.db.backends.postgresql_psycopg2',
    'NAME': 'your_db_name_here',
    'USER': 'your_user_name_here',
    'PASSWORD': 'your_password_here',
    'HOST': 'host_url_here',
    'PORT': 'port_here',
}
  1. Now use it in the settings.py accordingly:

    Import the postgresql_db.py file you have just created.

from creds.postgresql_db import MY_DB_CONFIG

Then, look for the dictionary named DATABASES and make it look like:

DATABASES = {
    "default": MY_DB_CONFIG,
}

... And that's all!

Here is another comprehensive example.

Screenshots

Dashboard

dashboard

View Contributors

See who contributed in the bills.

Contributors

Bill paymenet or adjustments

Pay or adjust as you wish.

bill_payment

Personal Expense

Track items by category. Create category on the fly!

personal_expense

Todo Lists

Create separate lists, add tasks and mark/unmark tasks!

todo_lists

About

A web app to maintain finance of my home.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published