{"id":13741162,"url":"https://github.com/thomaswormald/grpc-browser","last_synced_at":"2025-05-08T21:32:40.076Z","repository":{"id":41989363,"uuid":"430866747","full_name":"thomaswormald/grpc-browser","owner":"thomaswormald","description":"A web UI for browsing and executing gRPC operations in your .NET application","archived":false,"fork":false,"pushed_at":"2022-04-20T08:13:58.000Z","size":1083,"stargazers_count":23,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-04T04:07:33.778Z","etag":null,"topics":["grpc"],"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/thomaswormald.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-22T21:14:05.000Z","updated_at":"2024-06-09T01:57:54.000Z","dependencies_parsed_at":"2022-08-12T01:31:39.867Z","dependency_job_id":null,"html_url":"https://github.com/thomaswormald/grpc-browser","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomaswormald%2Fgrpc-browser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomaswormald%2Fgrpc-browser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomaswormald%2Fgrpc-browser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomaswormald%2Fgrpc-browser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomaswormald","download_url":"https://codeload.github.com/thomaswormald/grpc-browser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224774666,"owners_count":17367773,"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":["grpc"],"created_at":"2024-08-03T04:00:56.183Z","updated_at":"2024-11-15T11:30:58.082Z","avatar_url":"https://github.com/thomaswormald.png","language":"C#","funding_links":[],"categories":["Language-Specific"],"sub_categories":["C#"],"readme":"# gRPC Browser\n\nThis project allows you to add a web-based gRPC Browser for debugging purposes to your .NET application.\n\n![Example](docs/screenshots/fx_service.gif)\n\n[Click here to view more screenshots](docs/screenshots.md)\n\n## Features\n1. Allows you to view and execute gRPC services in your .NET application\n1. Supports both code-first gRPC and proto-first gRPC (with `.proto` files)\n2. Does not use gRPC reflection or gRPC web\n3. Support for all types of gRPC operation - Unary, Server Streaming, Client Streaming and Duplex\n4. Support for Metadata\n5. Support for [displaying documentation](docs/documentation.md)\n\n### Future Roadmap\n1. OAuth 2.0 support\n\n## Usage\n1. Add the package `GrpcBrowser` from NuGet to your project. Your project SDK must be Microsoft.NET.Sdk.Web (see Troubleshooting for further details).\n2. In the configure method of your Startup class, add `app.UseGrpcBrowser();`\n3. In the configure method of your Startup class, where you call `endpoints.MapGrpcService()`, add the following:\n   1. For Code-First GRPC Services: `.AddToGrpcBrowserWithService\u003cITheInterfaceOfMyCodeFirstService\u003e()`\n   2. For Proto-First (where you have defined a `.proto` file): `.AddToGrpcBrowserWithClient\u003cGeneratedClientClassForMyProtoFirstGrpcService\u003e()`\n4. In the `UseEndpoints()` setup, add `endpoints.MapGrpcBrowser()`\n\nFor example, the `Configure` method of a service with one proto-first and one code-first GRPC service could look like this:\n```csharp\npublic void Configure(IApplicationBuilder app, IWebHostEnvironment env)\n{\n    if (env.IsDevelopment())\n    {\n        app.UseDeveloperExceptionPage();\n    }\n\n    app.UseRouting();\n\n    app.UseGrpcBrowser();\n\n    app.UseEndpoints(endpoints =\u003e\n    {\n        endpoints.MapGrpcService\u003cProtoFirstSampleService\u003e().AddToGrpcBrowserWithClient\u003cProtoFirstGreeter.ProtoFirstGreeterClient\u003e();\n        endpoints.MapGrpcService\u003cCodeFirstGreeterService\u003e().AddToGrpcBrowserWithService\u003cICodeFirstGreeterService\u003e();\n\n        endpoints.MapGrpcBrowser();\n    });\n}\n```\n\n5. In the `ConfigureServices` method of your Startup class, add `services.AddGrpcBrowser()`\n\n6. Start your service, and navigate to `/grpc` in your browser.\n\n[Click here for information on displaying documentation](docs/documentation.md)\n\n## Troubleshooting\n\nExample projects for .NET Core 3.1, .NET 5.0 and .NET 6.0 can be found in the `/src` folder.\n\n### Error when navigating to `/grpc`\nMake sure that your service SDK type is Microsoft.NET.Sdk.Web. This is required because GrpcBrowser adds server-side Blazor to your project. In the `.csproj` file, set the Project Sdk like this: `\u003cProject Sdk=\"Microsoft.NET.Sdk.Web\"\u003e`\n\n## Implementation Detail\nThe service reflects over the types provided to `AddToGrpcBrowserWithClient` or `AddToGrpcBrowserWithClient` in order to determine the available operations, meaning that gRPC reflection is not required. Because we use server-side Blazor, the request execution is done from the server, meaning that gRPC web is not required.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomaswormald%2Fgrpc-browser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomaswormald%2Fgrpc-browser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomaswormald%2Fgrpc-browser/lists"}