Giter VIP home page Giter VIP logo

budget-manager's Introduction

Budget Manager Last version GitHub Workflow Status Go Report Card

Budger Manager is an easy-to-use, lightweight and self-hosted solution to track your finances

Month Page

It was inspired by Poor-Man's Budgeting Spreadsheet and You have less money than you think (rus). These projects have a fatal flaw: you can't add multiple spends in a single day. Budger Manager resolves that issue

Features:

  • Easy-to-use - simple and intuitive UI

  • Lightweight - backend is written in Go, HTML is prepared with Go templates. Vanilla JavaScript is used just to make frontend interactive. So, JS code is very primitive and lightweight: it won't devour all your CPU and RAM (even with Chrome ๐Ÿ˜‰)

  • Self-hosted - you don't need to trust any proprietary software to store your financial information

You can find more screenshots here


Install

You need Docker and docker-compose (optional)

  1. Create docker-compose.yml with the following content (you can find more settings in Configuration section):

    version: "2.4"
    
    services:
      budget-manager:
        image: ghcr.io/shoshinnikita/budget-manager:latest
        container_name: budget-manager
        environment:
          DB_TYPE: postgres
          DB_PG_HOST: postgres
          DB_PG_PORT: 5432
          DB_PG_USER: postgres
          DB_PG_PASSWORD: <db password>
          DB_PG_DATABASE: postgres
          SERVER_AUTH_BASIC_CREDS: <your credentials> # more info in 'Configuration' section
        ports:
          - "8080:8080"
    
      postgres:
        image: postgres:12-alpine
        container_name: budget-manager_postgres
        environment:
          POSTGRES_USER: postgres
          POSTGRES_PASSWORD: <db password>
          POSTGRES_DB: postgres
        volumes:
          # Store data in ./var/pg_data directory
          - type: bind
            source: ./var/pg_data
            target: /var/lib/postgresql/data
  2. Run docker-compose up -d

  3. Go to http://localhost:8080 (change the port if needed)

  4. Profit!

Configuration

Env Var Default value Description
LOGGER_MODE prod Logging format. dev or prod
LOGGER_LEVEL info Logging level. debug, info, warn, error, or fatal
DB_TYPE postgres Database type. postgres or sqlite
DB_PG_HOST localhost PostgreSQL host
DB_PG_PORT 5432 PostgreSQL port
DB_PG_USER postgres PostgreSQL username
DB_PG_PASSWORD PostgreSQL password
DB_PG_DATABASE postgres PostgreSQL database
DB_SQLITE_PATH ./var/budget-manager.db Path to the SQLite database
SERVER_PORT 8080
SERVER_USE_EMBED true Use the embedded templates and static files or read them from disk
SERVER_AUTH_DISABLE false Disable authentication
SERVER_AUTH_BASIC_CREDS List of comma separated login:password pairs. Passwords must be hashed using BCrypt (htpasswd -nB <user>)
SERVER_ENABLE_PROFILING false Enable pprof handlers. You can find handler urls here

Development

Commands

Run

# Run the app with installed Go and PostgreSQL in a Docker container
make

# Or run both the app and PostgreSQL in a Docker containers
make docker

Test

make test

More

You can find more commands in Makefile

Tools

Linter

golangci-lint can be used to lint the code. Just run make lint. Config can be found here

API documentation

swag is used to generate API documentation. You can find more information about API endpoints in section API

Endpoints

Pages

You can find screenshots of pages here

  • /months - Last 12 months
  • /months/month?year={year}&month={month} - Month info
  • /search/spends - Search for Spends

API

You can find Swagger 2.0 Documentation here. Use Swagger Editor to view it

budget-manager's People

Contributors

shoshinnikita avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.