{"id":19767650,"url":"https://github.com/erikwegner/wamytm","last_synced_at":"2025-04-30T16:34:01.170Z","repository":{"id":39828357,"uuid":"218145432","full_name":"ErikWegner/wamytm","owner":"ErikWegner","description":"Korporator is a collaboration tool for office times. Every person in a team can plan their times in the office, times working remote or being on vacation.","archived":false,"fork":false,"pushed_at":"2024-08-06T12:34:14.000Z","size":1924,"stargazers_count":5,"open_issues_count":4,"forks_count":1,"subscribers_count":4,"default_branch":"rc","last_synced_at":"2025-04-06T03:05:10.826Z","etag":null,"topics":["collaboration","office","team"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ErikWegner.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-28T21:07:16.000Z","updated_at":"2024-10-27T13:54:38.000Z","dependencies_parsed_at":"2024-08-06T14:25:30.093Z","dependency_job_id":"8ddc8590-72ea-440c-8c5c-d7e8b878e781","html_url":"https://github.com/ErikWegner/wamytm","commit_stats":null,"previous_names":[],"tags_count":52,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErikWegner%2Fwamytm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErikWegner%2Fwamytm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErikWegner%2Fwamytm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErikWegner%2Fwamytm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ErikWegner","download_url":"https://codeload.github.com/ErikWegner/wamytm/tar.gz/refs/heads/rc","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251742789,"owners_count":21636510,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["collaboration","office","team"],"created_at":"2024-11-12T04:31:22.660Z","updated_at":"2025-04-30T16:33:59.225Z","avatar_url":"https://github.com/ErikWegner.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Korporator\n\nDelevoped as WAMYTM: Where Are My Team Members?\n\nThis app allows every user to plan her/his office days and days off.\n\n[![Build Status](https://travis-ci.com/ErikWegner/wamytm.svg?branch=master)](https://travis-ci.com/ErikWegner/wamytm)\n[![Coverage Status](https://coveralls.io/repos/github/ErikWegner/wamytm/badge.svg?branch=master)](https://coveralls.io/github/ErikWegner/wamytm?branch=master)\n\n\n# Documentation\n\nNew documentation is avalable at https://erikwegner.github.io/wamytm/\n\n## Running\n\n### Using docker-compose\n\n- Start required containers: `docker-compose up -d`\n- Database\n  - Connect to database server: `docker-compose exec db psql -U postgres`\n  - Setup database (see [commands](#database-setup-commands))\n- Keycloak identity server\n  - Open Keycloak by visiting https://localhost:8443/auth/\n  - Temporary accept certificate\n- Korporator setup\n  - Connect to the app: `docker-compose exec korporator /bin/bash`\n  - Run `python manage.py migrate` to initialize database\n  - Run `python manage.py createsuperuser` to create backend admin\n- Access the backend at http://localhost:8000/admin/\n- Access the frondend at http://localhost:8000/\n  - Example users:\n    user1:3itsvxks, user2:Fq5vnMfj\n\n## Development\n\n[![Build Status](https://travis-ci.com/ErikWegner/wamytm.svg?branch=dev)](https://travis-ci.com/ErikWegner/wamytm)\n[![Coverage Status](https://coveralls.io/repos/github/ErikWegner/wamytm/badge.svg?branch=dev)](https://coveralls.io/github/ErikWegner/wamytm?branch=dev)\n\n\n- Checkout `dev` branch from repository \n- Start required containers: `docker-compose -f docker-compose-dev.yml up -d`\n- Database\n  - Connect to database server: `docker-compose -f docker-compose-dev.yml exec db psql -U postgres`\n  - Setup database (see [commands](#database-setup-commands))\n- Keycloak identity server\n  - Open Keycloak by visiting https://localhost:8443/auth/\n  - Temporarily accept certificate\n- Korporator setup\n  - Install [Python 3.10](https://www.python.org/downloads/)\n  - Install [pipenv](https://pipenv.readthedocs.io/): `pip install pipenv`\n  - Enter pipenv environment: `pipenv shell`\n  - Install dependencies: `PIPENV_VENV_IN_PROJECT=\"enabled\" pipenv install --dev`\n  - falls Windows Shell: setzen der Enviromentvariablen: $env:DJANGO_SETTINGS_MODULE='wamytmsite.settings.dev' (setzen der Variablen entfällt dann bei den folgenden Schritten)\n  - Initialize database: `cd src \u0026\u0026 DJANGO_SETTINGS_MODULE=wamytmsite.settings.dev python manage.py migrate`\n  - Create super user: `cd src \u0026\u0026 DJANGO_SETTINGS_MODULE=wamytmsite.settings.dev python manage.py createsuperuser`\n  - (Optional) Remove existing data and create new example data: `cd src \u0026\u0026 DJANGO_SETTINGS_MODULE=wamytmsite.settings.dev python manage.py example_data`\n- Run korporator\n  - Run application in development mode: `cd src \u0026\u0026 DJANGO_SETTINGS_MODULE=wamytmsite.settings.dev python manage.py runserver`\n  - Access the backend at http://localhost:8000/admin/\n  - Access the frondend at http://localhost:8000/\n  - Example users:\n    user1:3itsvxks, user2:Fq5vnMfj\n- Run tests:\n  - Bash:\n\n        # setup environment\n        export DJANGO_SETTINGS_MODULE=wamytmsite.settings.test\n        cd src\n        ./manage.py collectstatic\n\n        # run tests\n        ./manage.py test\n\n  - PowerShell: \n\n        # setup environment\n        $env:DJANGO_SETTINGS_MODULE=\"wamytmsite.settings.test\"\n        cd src\n        python manage.py collectstatic\n\n        # run tests\n        python manage.py test\n\n- Run tests with coverage:\n\n  ```bash\n  cd src\n  DJANGO_SETTINGS_MODULE=wamytmsite.settings.test coverage run --source='.' manage.py test wamytmapp\n  coverage html\n  python -m http.server --directory htmlcov/ 8008\n  ```\n\n### Configure login with Keycloak\n\n1. Create a new client `wamytm` in the realm's _Clients_ section\n2. Configure client settings:\n    - Settings \u003e Access Type \u003e confidential\n    - Settings \u003e Fine Grain OpenID Connect Configuration \u003e User Info Signed Response Algorithm \u003e RS256\n    - Settings \u003e Fine Grain OpenID Connect Configuration \u003e Request Object Signature Algorithm \u003e RS256\n3. Use the _Client ID_ (Settings tab) as value for `WAMYTM_KEYCLOAK_CLIENT_ID`\n4. Use the _Secret_ (Credentials tab) as value for `WAMYTM_KEYCLOAK_CLIENT_SECRET`\n5. Get the public key from Realm Settings \u003e Keys \u003e Public key and put it into settings as `WAMYTM_KEYCLOAK_PUBLIC_KEY`\n6. Update urls in `WAMYTM_KEYCLOAK_AUTH_URL` and `WAMYTM_KEYCLOAK_TOKEN_URL` with the correct hostname, port and realm name\n7. Configure username mapper: Clients \u003e Client ID \u003e Mappers: Create _User Property_ mapper, set _Token Claim Name_ to `username`, Property to `username` (or something equal, e. g. email)\n8. Open _Client Scopes_ and add new scope `wamytm`\n9. Open _Mappers_ tab and add a new mapper: Name `wamytm-audience`, Mapper Type `Audience`, Included Client Audience: `wamytm`, Add to access token `on`\n10. Open _Clients_ \u003e wamytm \u003e Client Scopes and add `wamytm ` from _Available client scopes_ to _Assigned default client scopes_\n\n## Database setup commands:\n\n    create user wamytm with encrypted password 'Stw9nUvm';\n    alter role wamytm set client_encoding to 'utf8';\n    alter role wamytm set default_transaction_isolation to 'read committed';\n    alter role wamytm set timezone to 'UTC';\n    create database wamytmdb;\n    revoke CONNECT on DATABASE wamytmdb from public;\n    grant all on DATABASE wamytmdb to wamytm;\n    alter database wamytmdb owner to wamytm;\n    \\c wamytmdb\n    alter schema public owner to wamytm;\n    \\q\n\nTo run tests, execute this command:\n\n    ALTER USER wamytm CREATEDB;\n\n## Container settings\n\n| Environment variable | Setting |  \n|---|---|\n| WAMYTM_TRUST_X_FORWARDED_PROTO |   `True` trust the X-Forwarded_Proto header |\n| | `False` to ignore the header |\n| USE_X_FORWARDED_HOST | `True` use X-Forwarded-Host header to construct links |\n| | `False` to ignore the header |\n\nSee [docker-compose.yml](docker-compose.yml) for further settings.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikwegner%2Fwamytm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferikwegner%2Fwamytm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikwegner%2Fwamytm/lists"}