Skip to content

f0rthsp4ce/refinance

Repository files navigation

refinance

logo

refined financial system for a hackerspace. simple by design.

architecture

entity

anything that can send or receive money: human, donate-box, rent, utility.

transaction

move X from A to B. supports all currencies.

  • non-confirmed
  • confirmed

balance

sum of all transactions. both confirmed and not. separated.

tags

mark entities and transactions for quick search.

security

X-Token header is used for authentication.

token will be sent to telegram_id of an entity. newly generated tokens do not revoke old ones.

you may request a new token any time: with name, id or telegram_id of your entity — anything you remember.

token — jwt with entity id & timestamp inside. basically it's a server-signed & verifiable json, base64'd.

run

docker compose up

http://localhost:8000/docs

develop

pipenv install --dev
pipenv shell

mkdir data
pytest
uvicorn refinance.app:app --reload

todo

  • base classes
  • errors
  • unit tests
  • complex search
  • pagination
  • tags
  • transactions
  • balances
  • date range search
  • recurrent payments
  • migrations (not alembic?)
  • logging
  • docker
  • grafana, statistics
  • authentication? (basic api key list)
  • permissions?
  • pytest ci

tests notice

tests are mostly autogenerated by llm, given the route and schema. human review would be beneficial.

license

MIT