Skip to content

soudis/habidat-direktkredit

Repository files navigation

habiDAT Direktkredite

This app is a direct loan management software for self organized housing projects like the ones of habiTAT (Austria) or Mietshäusersyndikat (Germany). It's no accounting software!

Features

  • Manage contacts, contracts and transaction with input validation to minimize human errors
  • Different forms of loans (cancellation period, duration, end date)
  • Multiagent (manage different projects / loan takers with 1 installation)
  • Automatic interest calculation with different interest calculation methods
  • Export of yearly summary for accounting
  • Generate fully customizable documents for lenders (supports office document templates)
  • Loan statistics including payback management and German legal limits (Bagatellgrenze)
  • Procrastination support

Usage

Either clone repository or build Dockerfile. Create

  • site.json
  • config.json
  • projects.json

in config folder. Run app.js or run docker container.

Usage with docker-compose (recommended)

  1. create docker-compose.yml from docker-compose.yml.sample
  2. change environment variables in docker-compose.yml, especially:
  • db:
    • MYSQL_ROOT_PASSWORD
    • MYSQL_PASSWORD
  • web:
    • HABIDAT_DK_PROJECT_ID
    • HABIDAT_DK_PROJECT_NAME
    • HABIDAT_LOGO
    • HABIDAT_ADMIN_EMAIL
    • HABIDAT_DK_ADMIN_USERNAME
    • HABIDAT_DK_ADMIN_PASSWORD
    • HABIDAT_DK_DB_PASSWORD
  1. create containers with docker-compose up -d
  2. copy logo image to container with docker cp /path/to/my-logo.gif "$(docker-compose ps -q web)":/habidat/public/images
  3. access with http://localhost:8020

It's recommended to use a revery proxy such as apache or nginx on your web server.

Document templates

You can generate custom documents within the app. Go to "Administration / Vorlagen" to upload new templates. The fields you can use are listed on the upload page and you can find examples here in the respository under "template samples".

Developing

You can user dev_entrypoint.sh for development with docker. You also need to mount the source code directory from the host system to the /habidat directory of the container.

project info

ENV HABIDAT_DK_PROJECT_ID project
ENV HABIDAT_DK_PROJECT_NAME Projectname
ENV HABIDAT_DK_LOGO logo.gif
ENV HABIDAT_DK_EMAIL [email protected]

project defaults

ENV HABIDAT_DK_PROJECT_DEFAULTS_INTEREST_METHOD 365_compound
ENV HABIDAT_DK_PROJECT_DEFAULTS_TERMINATION_TYPE T
ENV HABIDAT_DK_PROJECT_DEFAULTS_TERMINATION_PERIOD 6
ENV HABIDAT_DK_PROJECT_DEFAULTS_TERMINATION_PERIOD_TYPE M

database settings

# database uri (optional)
#ENV HABIDAT_DK_DB_URI mysql://user:[email protected]:1234/dbname
ENV HABIDAT_DK_DB_USER project
ENV HABIDAT_DK_DB_PASSWORD secret
ENV HABIDAT_DK_DB_DATABASE project
ENV HABIDAT_DK_DB_HOST db

admin authentication settings

ENV HABIDAT_DK_ADMIN_AUTH ldap

ldap settings (optional)

ENV HABIDAT_DK_LDAP_HOST ldap
ENV HABIDAT_DK_LDAP_PORT 389
ENV HABIDAT_DK_LDAP_BINDDN cn=ldap-read,dc=example,dc=com
ENV HABIDAT_DK_LDAP_PASSWORD secret
ENV HABIDAT_DK_LDAP_BASE dc=example,dc=com
ENV HABIDAT_DK_LDAP_SEARCHFILTER (cn={{username}})

web server settings

ENV HABIDAT_DK_PORT_HTTP 80
ENV HABIDAT_DK_HTTPS false
ENV HABIDAT_DK_PORT_HTTPS 443
ENV HABIDAT_DK_SSL_CERT config/certificate.pem
ENV HABIDAT_DK_SSL_KEY config/key.pem
ENV HABIDAT_DK_REVERSE_PROXY true

for bootstrap admin account

ENV HABIDAT_DK_ADMIN_USER admin
ENV HABIDAT_DK_ADMIN_EMAIL [email protected]
ENV HABIDAT_DK_ADMIN_PASSWORD secret

oidc settings (optional)

#only if admin auth method includes oidc
HABIDAT_DK_AUTH_ADMIN_OIDC_LABEL=Keycloak (Admin)
HABIDAT_DK_AUTH_ADMIN_OIDC_ISSUER=http://keycloak:8080/realms/collectivo
HABIDAT_DK_AUTH_ADMIN_OIDC_CLIENT_ID=habidat
HABIDAT_DK_AUTH_ADMIN_OIDC_CLIENT_SECRET=hF2EGOwy7QTI5G9SNGFTejsC9j8G5X34
HABIDAT_DK_AUTH_ADMIN_OIDC_CALLBACK_URL=http://direktkredit.local:8020/login-oidc-cb
HABIDAT_DK_AUTH_ADMIN_OIDC_AUTH_URL=http://keycloak:8080/realms/collectivo/protocol/openid-connect/auth
HABIDAT_DK_AUTH_ADMIN_OIDC_TOKEN_URL=http://keycloak:8080/realms/collectivo/protocol/openid-connect/token
HABIDAT_DK_AUTH_ADMIN_OIDC_USERINFO_URL=http://keycloak:8080/realms/collectivo/protocol/openid-connect/userinfo
#list of user auth methods (local or oidc)
HABIDAT_DK_AUTH_USER_METHOD=local,oidc
#only if user auth method includes OIDC:
HABIDAT_DK_AUTH_USER_OIDC_LABEL=Keycloak
HABIDAT_DK_AUTH_USER_OIDC_ISSUER=http://keycloak:8080/realms/collectivo
HABIDAT_DK_AUTH_USER_OIDC_CLIENT_ID=habidat
HABIDAT_DK_AUTH_USER_OIDC_CLIENT_SECRET=hF2EGOwy7QTI5G9SNGFTejsC9j8G5X34
HABIDAT_DK_AUTH_USER_OIDC_CALLBACK_URL=http://direktkredit.local:8020/login-oidc-cb
HABIDAT_DK_AUTH_USER_OIDC_AUTH_URL=http://keycloak:8080/realms/collectivo/protocol/openid-connect/auth
HABIDAT_DK_AUTH_USER_OIDC_TOKEN_URL=http://keycloak:8080/realms/collectivo/protocol/openid-connect/token
HABIDAT_DK_AUTH_USER_OIDC_USERINFO_URL=http://keycloak:8080/realms/collectivo/protocol/openid-connect/userinfo

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published