Skip to content

Installation

Fork the repo

Go to our github project and press fork (or visit this url directly).

  • Fill out the repository name
  • Press create fork
  • Copy your fork url

Clone the project

Go to a directory that you want the fork to be in, e.g. E:/projects/ and go into the terminal

git clone [copied fork url]

# for example
# git clone https://github.com/YourUserName/MyFinances.git

Setup environment variables

  1. Copy the template environment variables
    cp .env.sample .env
    
  2. Edit the template environment variables to your needs, e.g. with nano shell nano .env

Setup the backend (Django)

Make sure you have done the previous steps first!

  1. Create a virtual environment and activate it

    python -m venv ./venv/
    
    ./venv/Scripts/activate
    
    OR if you are running in a POSIX system such as: bash/zsh, fish, csh/tcsh, or PowerShell, the command to activate the virtual environment is:

    ./venv/bin/activate
    
    More information here

  2. Install our dependencies using python poetry

    pip install poetry
    
    poetry install --no-root --with mypy,django,dev
    
    If the installation of poetry gives error messages check out our debugging section on poetry.

  3. Setup a database (we suggest using sqlite so there's no installation!) To do this you can use one of our database guides, we currently only support 3 databases:

  4. Migrate the database

    python manage.py migrate
    

  5. Create an administrator account

    python manage.py createsuperuser
    

  6. Run the application

    python manage.py runserver
    

Setup the frontend

Please NEVER edit the output.css file to make custom css changes, only manually edit the input.css file.

Tailwind CSS

  1. Install NPM (follow a guide like this)
  2. Run npm install
    npm install
    

Tailwind Watch

You can run tailwind watch to update the CSS files as you use tailwind classes. This will auto-build every time you make changes, providing you still have the terminal open.

npm run tailwind-watch

Keep in mind, if you don't run tailwind watch you WILL NOT be able to use tailwind classes and may break new changes.

Tailwind Build

To be honest, tailwind watch is nice, but especially on my windows computer it is very CPU and Memory intesive, every single change, even 1 character causes a re-watch, and this is a lot... Instead of that, you can use tailwind-build to only do a one-time build. You need to remember to run the command after a major update though, incase you add new classes.

npm run tailwind-build

Webpack for JS

Webpack is used to bundle our javascript into one file to make development easier and speed up builds. The project now uses chunks to load javascript, so you should see a few files with ids such as 937. Django will automatically pick these up. Check below for details on how to run webpack.

Run webpack dev

npm run webpack-dev # this only runs it once

npm run webpack-watch # this does the same as above, but listens for updates

Problem Solving Errors

If you are having trouble with the installation process, we have some possible fixes. Check out our debugging section.