{"id":21365129,"url":"https://github.com/altinn/altinn-profile","last_synced_at":"2025-08-27T07:12:06.588Z","repository":{"id":37807567,"uuid":"462033688","full_name":"Altinn/altinn-profile","owner":"Altinn","description":"Altinn platform microservice for handling user profile","archived":false,"fork":false,"pushed_at":"2025-08-21T13:18:11.000Z","size":950,"stargazers_count":0,"open_issues_count":45,"forks_count":0,"subscribers_count":19,"default_branch":"main","last_synced_at":"2025-08-21T15:42:18.350Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Altinn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-02-21T21:13:51.000Z","updated_at":"2025-08-21T11:39:00.000Z","dependencies_parsed_at":"2023-10-12T16:31:56.392Z","dependency_job_id":"3530e354-d917-4319-af4a-6e2090e3da03","html_url":"https://github.com/Altinn/altinn-profile","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Altinn/altinn-profile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Altinn%2Faltinn-profile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Altinn%2Faltinn-profile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Altinn%2Faltinn-profile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Altinn%2Faltinn-profile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Altinn","download_url":"https://codeload.github.com/Altinn/altinn-profile/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Altinn%2Faltinn-profile/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272302977,"owners_count":24910297,"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","status":"online","status_checked_at":"2025-08-27T02:00:09.397Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-22T07:09:49.160Z","updated_at":"2025-08-27T07:12:06.576Z","avatar_url":"https://github.com/Altinn.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Altinn Profile\n\n## Build status\n[![Profile build status](https://dev.azure.com/brreg/altinn-studio/_apis/build/status/altinn-platform/profile-master?label=platform/profile)](https://dev.azure.com/brreg/altinn-studio/_build/latest?definitionId=38)\n\n\n## Project organization\nThis is a backend WebAPI solution written in .NET / C# following the clean architecture principles.\n\n### Altinn.Profile\nThe API layer that consumes services provided by _Altinn.Profile.Core_\n\nRelevant implementations:\n- Controllers\n- Program.cs\n\n\n### Altinn.Profile.Core\nThe domain and application layer that implements the business logic of the system.\n\nRelevant implementations:\n- Interfaces for external dependencies implemented by infrastructure and repository layer\n- Domain models\n- Services\n\n### Altinn.Profile.Integrations\nThe infrastructure layer that implements the interfaces defined in _Altinn.Profile.Core_ for integrations towards 3rd-party libraries and systems.\n\nRelevant implementations:\n- Clients for communicating with SBL Bridge in Altinn 2\n- Database for KRR-data\n- Client for communicating with KRR to update the local DB\n\n\n## Getting Started\n\nThese instructions will get you a copy of the profile component up and running on your machine for development and testing purposes.\n\n### Prerequisites\n\n1. [.NET 9.0 SDK](https://dotnet.microsoft.com/download/dotnet/9.0)\n2. Newest [Git](https://git-scm.com/downloads)\n3. A code editor - we like [Visual Studio Code](https://code.visualstudio.com/download)\n   - Also install [recommended extensions](https://code.visualstudio.com/docs/editor/extension-marketplace#_workspace-recommended-extensions) (e.g. [C#](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp))\n4. [Podman](https://podman.io/) or another container tool such as Docker Desktop\n5. [PostgreSQL](https://www.postgresql.org/download/)\n6. [pgAdmin](https://www.pgadmin.org/download/)\n\n### Setting up PostgreSQL\n\nEnsure that both PostgreSQL and pgAdmin have been installed and start pgAdmin.\n\nIn pgAdmin\n- Create database _profiledb_\n- Create the following users with password: _Password_ (see privileges in parentheses)\n  - platform_profile_admin (superuser, canlogin)\n  - platform_profile (canlogin)\n\nA more detailed description of the database setup is available in [our developer handbook](https://docs.altinn.studio/community/contributing/handbook/postgres/)\n\n\n### Cloning the application\n\nClone [Altinn Profile repo](https://github.com/Altinn/altinn-profile) and navigate to the folder.\n\n```bash\ngit clone https://github.com/Altinn/altinn-profile\ncd altinn-profile\n```\n\n### Running the application in a docker container\n\n- Start Altinn Profile docker container by running the command\n\n```cmd\npodman compose up -d --build\n```\n\n- To stop the container running Altinn Profile run the command\n\n```cmd\npodman stop altinn-platform-profile\n```\n\n\n### Running the application with .NET\n\nThe Profile components can be run locally when developing/debugging. Follow the install steps above if this has not already been done.\n\n- Navigate to _src/Altinn.Profile, and build and run the code from there, or run the solution using you selected code editor\n\n```cmd\ncd src/Altinn.Profile\ndotnet run\n```\n\nThe profile solution is now available locally at http://localhost:5030/.\nTo access swagger use http://localhost:5030/swagger.\n\n### Populate the Profile DB with KRR data\n\n1. Set up required user secrets for Maskinporten integration in the ASP.NET Core Secret Manager, e.g. via CLI by running the following commands from `src/Altinn.Profile`\n```cmd\ndotnet user-secrets set \"ContactAndReservationSettings:MaskinportenSettings:ClientId\" \"{SECRET_GOES_HERE}\"\ndotnet user-secrets set \"ContactAndReservationSettings:MaskinportenSettings:EncodedJwk\" \"{SECRET_GOES_HERE}\"\n```\n2. Run the application, and send the following request (e.g. using Postman) to initiate the synchronization job:\n   ```cmd\n   GET http://localhost:5030/profile/api/v1/trigger/syncpersonchanges\n   ```\n\n### Adding migrations with EF core\n1. Code the desired classes and add them to the DB context\n2. Run the following command in a terminal from src/Altinn.Profile.Integrations to add a migration. The name should be more descriptive than AddNewMigration:\n   ```cmd\n   dotnet ef migrations Add AddNewMigration --startup-project ../Altinn.Profile\n   ```\n3. To generate SQL scripts, run `dotnet ef migrations script --startup-project ../Altinn.Profile`\n\nIf you want to remove the migration run `dotnet ef migrations remove --startup-project ../Altinn.Profile`\nRead more about applying migrations [here](https://learn.microsoft.com/en-us/ef/core/managing-schemas/migrations/?tabs=dotnet-core-cli).\n\n### Running Bruno requests\nIn order to run the requests with active access tokens, you need to add the secrets for the token generator tool. This should be added in a `.env` file. An example is added to the folder. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faltinn%2Faltinn-profile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faltinn%2Faltinn-profile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faltinn%2Faltinn-profile/lists"}