{"id":25499963,"url":"https://github.com/jonathanpotts/aspirenextjskeycloak","last_synced_at":"2025-07-02T19:33:56.473Z","repository":{"id":276398401,"uuid":"929178694","full_name":"jonathanpotts/AspireNextjsKeycloak","owner":"jonathanpotts","description":"Example project using .NET Aspire with a Next.js (React) frontend, an ASP.NET Core backend, and Keycloak for authentication.","archived":false,"fork":false,"pushed_at":"2025-04-28T19:57:35.000Z","size":188,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-26T10:56:05.839Z","etag":null,"topics":["app-router","asp-net-core","aspire","csharp","dotnet","dotnet-core","keycloak","nextauth","nextjs","opentelemetry","react","react-server-components","react19","typescript"],"latest_commit_sha":null,"homepage":"","language":"C#","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/jonathanpotts.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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-08T00:31:35.000Z","updated_at":"2025-06-21T19:12:05.000Z","dependencies_parsed_at":"2025-02-08T01:23:07.760Z","dependency_job_id":"995f3028-c1ae-443e-915a-b5218bc18b9c","html_url":"https://github.com/jonathanpotts/AspireNextjsKeycloak","commit_stats":null,"previous_names":["jonathanpotts/aspirenextjskeycloak"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jonathanpotts/AspireNextjsKeycloak","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanpotts%2FAspireNextjsKeycloak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanpotts%2FAspireNextjsKeycloak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanpotts%2FAspireNextjsKeycloak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanpotts%2FAspireNextjsKeycloak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonathanpotts","download_url":"https://codeload.github.com/jonathanpotts/AspireNextjsKeycloak/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanpotts%2FAspireNextjsKeycloak/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263203895,"owners_count":23430119,"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":["app-router","asp-net-core","aspire","csharp","dotnet","dotnet-core","keycloak","nextauth","nextjs","opentelemetry","react","react-server-components","react19","typescript"],"created_at":"2025-02-19T03:28:33.795Z","updated_at":"2025-07-02T19:33:56.460Z","avatar_url":"https://github.com/jonathanpotts.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AspireNextjsKeycloak\nExample project using [.NET Aspire](https://dotnet.microsoft.com/apps/cloud) with a [Next.js](https://nextjs.org/) ([React](https://react.dev/)) frontend, an [ASP.NET Core](https://dotnet.microsoft.com/apps/aspnet/apis) backend, and [Keycloak](https://www.keycloak.org/) for authentication.\n\n## Requirements\nThis project requires the following:\n* [.NET](https://dotnet.microsoft.com/) SDK 8.0 or later\n  * ASP.NET Core Runtime 8.0\n* [Node.js](https://nodejs.org/) 18.18 or later\n* [Docker Desktop](https://www.docker.com/) or [Podman](https://podman.io/)\n\n## Running\nTo run this project, do the following:\n1. Start Docker Desktop or Podman if it is not already running\n2. Either:\n   * In the `AspireNextjsKeycloak.AppHost` directory, run: `dotnet run -lp https` and then open the dashboard using the URL output to the console\n   * Open `AspireNextjsKeycloak.sln` in an IDE (e.g. Visual Studio, Rider) and run the `AspireNextjsKeycloak.AppHost` project using the `https` launch profile\n\nThe default users are:\n| Username | Password |\n| - | - |\n| alice | alice |\n| bob | bob |\n\n## Projects\n### AspireNextjsKeycloak.AppHost\nAn [Aspire app host](https://learn.microsoft.com/dotnet/aspire/fundamentals/app-host-overview) which handles orchestration and hosts the [Aspire dashboard](https://learn.microsoft.com/dotnet/aspire/fundamentals/dashboard/overview).\n\n**Uses:**\n* **[Aspire.Hosting.Keycloak](https://learn.microsoft.com/dotnet/aspire/authentication/keycloak-integration#hosting-integration)** - Handles starting up the Keycloak container and importing the realm data\n* **[Aspire.Hosting.NodeJs](https://learn.microsoft.com/dotnet/aspire/get-started/build-aspire-apps-with-nodejs)** - Handles launching and configuring the Node.js-based frontend project\n\n### AspireNextjsKeycloak.ApiService\nAn ASP.NET Core [minimal APIs](https://learn.microsoft.com/aspnet/core/fundamentals/minimal-apis/overview?view=aspnetcore-8.0) backend which requires authorization from Keycloak.\n\n**Uses:**\n* **[Aspire.Keycloak.Authentication](https://learn.microsoft.com/dotnet/aspire/authentication/keycloak-integration#client-integration)** - Handles configuring authentication settings for Keycloak\n\n### AspireNextjsKeycloak.Web\nA Next.js frontend using the [App Router](https://nextjs.org/docs/app) and [React Server Components](https://react.dev/reference/rsc/server-components) that authenticates the user and displays data from the backend.\n\n**Uses:**\n* **[OpenTelemetry](https://nextjs.org/docs/app/building-your-application/optimizing/open-telemetry)** - Adds observability to the Next.js server (modified to support gRPC endpoints when using the Node.js runtime)\n* **[NextAuth.js](https://next-auth.js.org/) (a.k.a. next-auth)** - Handles the auth flows\n* **[Material UI](https://mui.com/material-ui/) (a.k.a. MUI)** - Provides [Material Design 2](https://m2.material.io/)-based components for React\n\n## Notice\nPlease do not use the realm data from this repository in production as the secrets are exposed to the public.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanpotts%2Faspirenextjskeycloak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonathanpotts%2Faspirenextjskeycloak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanpotts%2Faspirenextjskeycloak/lists"}