Giter VIP home page Giter VIP logo

money-balancer's Introduction

money-balancer

Have you ever been on a group trip and lost track of who paid for what and who owes money to whom? If so, money balancer is the perfect tool for you! It helps you to keep track of who paid for what and calculates your balance with all of your friends. A demo is available here but it may be reset at any time.

Screenshots

Screenshot 1 Screenshot 2

Usage

Using docker-compose:

version: "3"
services:
  money-balancer:
    image: ghcr.io/dorianim/money-balancer
    restart: unless-stopped
    ports:
      - 8000:8000
    volumes:
      - ./data:/data
    environment:
      - MONEYBALANCER_JWT_SECRET=some_super_secret_secret

Using docker:

docker run -p8000:8000 -e MONEYBALANCER_JWT_SECRET=some_super_secret_secret -v $(pwd)/data:/data ghcr.io/dorianim/money-balancer

You can then access money-balancer on http://localhost:8000. The API documentation can be found at http://localhost:8000/api/v1.

Config options

General

  • MONEYBALANCER_JWT_SECRET: a random value for the JWT signature

Authentication

Local

  • MONEYBALANCER_AUTH_LOCAL_ENABLED: enable local username/password authentication

Proxy

Proxy authentication can be used with services like Authelia and Authentik

  • MONEYBALANCER_AUTH_PROXY_ENABLED: enable proxy authentication
  • MONEYBALANCER_AUTH_PROXY_HEADERS_USERNAME: header containing the username (e.g. X-authentik-username)
  • MONEYBALANCER_AUTH_PROXY_HEADERS_NICKNAME: header containing the nickname (e.g. X-authentik-name)

If you want to use another sign on method, you may only protect the route /api/v1/auth/proxy.

For example in Authentik, you may use this as the unauthenticated paths:

^([^p]|p(p|r(p|o(p|xp)))*([^pr]|r([^op]|o([^px]|x[^py]))))*(p(p|r(p|o(p|xp)))*(r(o?|ox))?)?$

(excludes everything that contains proxy, generated with this tool)

How debts are split up:

  • amount / debtors
  • the potential rest is assigned to people who have to overpay
  • who has to overpay is determined by how often they have overpaid in the past in this specific group

Development

You need cargo and yarn installed on your system. You can build everything using

cargo build

This will create a static binary in target/debug/money-balancer which you can run.

money-balancer's People

Contributors

dorianim 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.