Skip to content

lj-n/genug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

genug

genug is a self-hosting budgeting app with focus on simplicity



gif of different genug pages

Table of Contents

Features

Categories

Define categories such as food, rent, leisure, etc. to organize and track your expenses in a structured way.

Transactions

Create, update or delete detailed transactions to get an accurate and up-to-date overview of your expenses.

Accounts

Each transaction is linked to a specific account, so you can easily keep an eye on your account balances.

Budget

Plan your spending every month for each category. Know what your money's doing.

Teams

Teams enables multiple users to work together on budgeting. Users in teams can collaborate on the same budget and share categories, accounts and transactions.

How it works

Install

  1. Create a local clone of this repository or download the latest release
  2. Run docker build -t genug . to build the docker image
  3. Run docker volume create genug-db to create a docker volume, so the database can be persisted
  4. Run docker run -dp 127.0.0.1:3000:3000 --mount type=volume,src=genug-db,target=/app/data/ genug <username> <password> to start the container (If you provide username and password params, a user will be created. This is optional but can be useful if user-creation is disabled in your instance.)

By default Sveltekit will accept connections on 0.0.0.0 using port 3000. You can pass the ORIGIN environment variable in the docker build command like this:

docker build --build-arg ORIGIN_URL=https://my-url.com  -t genug .

Updating

Pull the latest changes from the repository and repeat the steps from the install section. Database migration will be run automatically inside the docker container.

Backups

If you want to backup your data, simply copy the genug.db file from the docker volume to a safe location. If you have sqlite3 installed on your machine, you can also use the backup.sh script to create a backup of the database. (Change the DB_FILE and BACKUP_DIR variables to your needs)

Example cronjob to run the backup script every day:

0 0 * * * /path/to/genug/backup.sh

Development

Prequisites

Setup

  1. Run npm install
  2. Run npm run migrations:push to create the SQLite database
  3. Run npm run dev to start the local dev server

Changing database tables

The used ORM is Drizzle ORM. After changes to the tables defined in /src/lib/server/schema/tables.ts run npm run migrations:generate to generate migration files. To apply these changes to the database run npm run migrations:push.

Why I did this

This app was created for personal use and learning purposes. Everyone is free to use genug as they see fit.