{"id":22402588,"url":"https://github.com/lblod/app-organization-portal","last_synced_at":"2025-03-27T00:42:47.407Z","repository":{"id":36954928,"uuid":"348358886","full_name":"lblod/app-organization-portal","owner":"lblod","description":"OrganisatiePortaal backend","archived":false,"fork":false,"pushed_at":"2024-04-15T14:18:00.000Z","size":3217,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":9,"default_branch":"development","last_synced_at":"2024-04-16T06:36:57.825Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lblod.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2021-03-16T13:31:03.000Z","updated_at":"2024-08-26T12:20:11.459Z","dependencies_parsed_at":"2023-10-02T09:07:33.733Z","dependency_job_id":"6f75ad2c-2813-46f6-9425-0d4fb24b3894","html_url":"https://github.com/lblod/app-organization-portal","commit_stats":null,"previous_names":[],"tags_count":173,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lblod%2Fapp-organization-portal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lblod%2Fapp-organization-portal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lblod%2Fapp-organization-portal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lblod%2Fapp-organization-portal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lblod","download_url":"https://codeload.github.com/lblod/app-organization-portal/tar.gz/refs/heads/development","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245760897,"owners_count":20667893,"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":[],"created_at":"2024-12-05T09:13:37.013Z","updated_at":"2025-03-27T00:42:47.402Z","avatar_url":"https://github.com/lblod.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Organization portal\n\nBackend for the organization portal application, based on the mu.semte.ch microservices stack.\n\n## How to\n\n### Boot up the system in DEV environment\n\n    cd /path/to/mu-project\n    docker-compose -f docker-compose.yml -f docker-compose.dev.yml up\n\nYou can shut down using `docker-compose stop` and remove everything using `docker-compose rm`.\n\n#### Setup consumers\n\nThe application depends on external data. You'll have to perform extra steps if you want this data to be available.\nThese are multiple data sets, we'll try to be exhaustive on how to ingest these. Even though the procedures are similar.\n\n#### Setup mandatarissen sync\nNote: this is assuming you have never ran this before.\n```\ndrc down;\n```\nUpdate `docker-compose.override.yml` to:\n```\n  mandatarissen-consumer:\n    environment:\n      DCR_SYNC_BASE_URL: \"https://loket.lokaalbestuur.vlaanderen.be\" # or another endpoint\n      DCR_LANDING_ZONE_DATABASE: \"triplestore\"\n      DCR_REMAPPING_DATABASE: \"triplestore\"\n      DCR_DISABLE_DELTA_INGEST: \"false\"\n      DCR_DISABLE_INITIAL_SYNC: \"false\"\n```\nThen:\n```\ndrc up -d migrations\ndrc up -d db mandatarissen-consumer\n# Wait until success of the previous step\n```\nThen, update `docker-compose.override.yml` to:\n```\n  mandatarissen-consumer:\n    environment:\n      DCR_SYNC_BASE_URL: \"https://loket.lokaalbestuur.vlaanderen.be\" # or another endpoint\n      DCR_LANDING_ZONE_DATABASE: \"db\"\n      DCR_REMAPPING_DATABASE: \"db\"\n      DCR_DISABLE_DELTA_INGEST: \"false\"\n      DCR_DISABLE_INITIAL_SYNC: \"false\"\n```\nFinally, put the stack back up and reindex elasticsearch\n```\ndrc up -d\nsh scripts/reset-elastic.sh\n```\n\n#### Setup leidinggevenden sync (http://data.lblod.info/vocabularies/leidinggevenden/Functionaris)\n\nNote: this is assuming you have never ran this before.\n```\ndrc down;\n```\nUpdate `docker-compose.override.yml` to:\n```\n  leidinggevenden-consumer:\n    environment:\n      DCR_SYNC_BASE_URL: \"https://loket.lokaalbestuur.vlaanderen.be\" # or another endpoint\n      DCR_LANDING_ZONE_DATABASE: \"triplestore\" # for the initial sync, we go directly to virtuoso\n      DCR_REMAPPING_DATABASE: \"triplestore\" # for the initial sync, we go directly to virtuoso\n      DCR_DISABLE_DELTA_INGEST: \"false\"\n      DCR_DISABLE_INITIAL_SYNC: \"false\"\n```\nThen:\n```\ndrc up -d migrations\ndrc up -d db leidinggevenden-consumer\n# Wait until success of the previous step\n```\nThen, update `docker-compose.override.yml` to:\n```\n  leidinggevenden-consumer:\n    environment:\n      DCR_SYNC_BASE_URL: \"https://loket.lokaalbestuur.vlaanderen.be\" # choose the correct endpoint\n      DCR_LANDING_ZONE_DATABASE: \"db\"\n      DCR_REMAPPING_DATABASE: \"db\"\n      DCR_DISABLE_DELTA_INGEST: \"false\"\n      DCR_DISABLE_INITIAL_SYNC: \"false\"\n```\nFinally, put the stack back up and reindex elasticsearch\n```\ndrc up -d\nsh scripts/reset-elastic.sh\n```\n\n#### Setup worship mandatees sync\n\nNote: this is assuming you have never ran this before.\n```\ndrc down;\n```\nUpdate `docker-compose.override.yml` to:\n```\n  worship-services-main-info-consumer:\n    environment:\n      DCR_SYNC_BASE_URL: \"https://loket.lokaalbestuur.vlaanderen.be\" # or another endpoint\n      DCR_SYNC_LOGIN_ENDPOINT: \"https://loket.lokaalbestuur.vlaanderen.be/sync/worship-services-sensitive/login\" # or another endpoint\n      DCR_SECRET_KEY: \"key-of-the-producer\"\n      DCR_LANDING_ZONE_DATABASE: \"triplestore\"\n      DCR_REMAPPING_DATABASE: \"triplestore\"\n      DCR_DISABLE_DELTA_INGEST: \"false\"\n      DCR_DISABLE_INITIAL_SYNC: \"false\"\n  worship-services-private-info-consumer:\n    environment:\n      DCR_SYNC_BASE_URL: \"https://loket.lokaalbestuur.vlaanderen.be\" # or another endpoint\n      DCR_SYNC_LOGIN_ENDPOINT: \"https://loket.lokaalbestuur.vlaanderen.be/sync/worship-services-sensitive/login\" # or another endpoint\n      DCR_SECRET_KEY: \"key-of-the-producer\"\n      DCR_LANDING_ZONE_DATABASE: \"triplestore\"\n      DCR_REMAPPING_DATABASE: \"triplestore\"\n      DCR_DISABLE_DELTA_INGEST: \"false\"\n      DCR_DISABLE_INITIAL_SYNC: \"false\"\n```\nThen:\n```\ndrc up -d migrations\ndrc up -d db worship-services-main-info-consumer worship-services-private-info-consumer\n# Wait until success of the previous step\n```\nThen, update `docker-compose.override.yml` to:\n```\nworship-services-main-info-consumer:\n    environment:\n      DCR_SYNC_BASE_URL: \"https://loket.lokaalbestuur.vlaanderen.be\" # or another endpoint\n      DCR_SYNC_LOGIN_ENDPOINT: \"https://loket.lokaalbestuur.vlaanderen.be/sync/worship-services-sensitive/login\" # or another endpoint\n      DCR_SECRET_KEY: \"key-of-the-producer\"\n      DCR_LANDING_ZONE_DATABASE: \"db\"\n      DCR_REMAPPING_DATABASE: \"db\"\n      DCR_DISABLE_DELTA_INGEST: \"false\"\n      DCR_DISABLE_INITIAL_SYNC: \"false\"\n  worship-services-private-info-consumer:\n    environment:\n      DCR_SYNC_BASE_URL: \"https://loket.lokaalbestuur.vlaanderen.be\" # or another endpoint\n      DCR_SYNC_LOGIN_ENDPOINT: \"https://loket.lokaalbestuur.vlaanderen.be/sync/worship-services-sensitive/login\" # or another endpoint\n      DCR_SECRET_KEY: \"key-of-the-producer\"\n      DCR_LANDING_ZONE_DATABASE: \"db\"\n      DCR_REMAPPING_DATABASE: \"db\"\n      DCR_DISABLE_DELTA_INGEST: \"false\"\n      DCR_DISABLE_INITIAL_SYNC: \"false\"\n```\nFinally, put the stack back up and reindex elasticsearch\n```\ndrc up -d\nsh scripts/reset-elastic.sh\n```\n\n### Setting up the delta-producers related services\nTo make sure the app can share data, producers need to be set up. There is an intial sync, that is potentially very expensive, and must be started manually\n\n#### producers administrative-units\n\n1. make sure the app is up and running, the migrations have run\n2. in docker-compose.override.yml, make sure the following configuration is provided:\n```\n  delta-producer-pub-graph-maintainer-administrative-units:\n    environment:\n      START_INITIAL_SYNC: 'true'\n```\n3. `drc up -d delta-producer-pub-graph-maintainer-administrative-units`\n4. You can follow the status of the job, ideally through the dashboard, but this hasn't been setup yet. The following query should also give results:\n```\n   PREFIX task: \u003chttp://redpencil.data.gift/vocabularies/tasks/\u003e\n   PREFIX adms: \u003chttp://www.w3.org/ns/adms#\u003e\n   PREFIX dct: \u003chttp://purl.org/dc/terms/\u003e\n\n    SELECT DISTINCT ?job ?operation ?created ?modified ?status WHERE {\n       GRAPH ?g {\n         ?job a \u003chttp://vocab.deri.ie/cogs#Job\u003e;\n              task:operation ?operation;\n              adms:status ?status;\n              dct:created ?created;\n              dct:modified ?modified.\n       }\n       FILTER( ?operation IN (\n         \u003chttp://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/administrative-units\u003e,\n         \u003chttp://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/healingOperation/administrative-units\u003e\n        )\n       )\n     }\n```\n\n## Configuring the dashboard\n### Accessing the dashboard from your local machine\n\nSince we use dispatcher v2, which dispatches on hostname, we'll have to update `/etc/hosts`.\nAdd an entry similar to the following. Ensure the first part of the domain starts with `dashboard`.:\n\n```\n127.0.0.1 dashboard.localhost\n```\n\n### Creating new users\nFor now, we use specific logins for the dashboard users. Each environment has its own passwords.\n\nTo add a user, make sure to have [mu-cli](https://github.com/mu-semtech/mu-cli) installed first.\nThen in `docker-compose.override.yml`\n```\n  dashboard-login:\n    environment:\n      MU_APPLICATION_SALT: 'a_random_string_with_sufficient_entropy_hence_not_this_one'\n```\nYou can now generate a user by running `mu script project-scripts generate-dashboard-login` and following the steps.\nRestart `migrations` and it should insert the new user into the database.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flblod%2Fapp-organization-portal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flblod%2Fapp-organization-portal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flblod%2Fapp-organization-portal/lists"}