{"id":37206185,"url":"https://github.com/merefield/grpc-user-api","last_synced_at":"2026-01-14T23:44:33.791Z","repository":{"id":57564009,"uuid":"334414808","full_name":"merefield/grpc-user-api","owner":"merefield","description":"All the boilerplate you need to get started with writing grpc-gateway powered REST services in Go","archived":false,"fork":true,"pushed_at":"2021-03-22T18:31:08.000Z","size":124008,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-20T08:16:47.838Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"johanbrandhorst/grpc-gateway-boilerplate","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/merefield.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-01-30T13:07:12.000Z","updated_at":"2021-03-23T09:17:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/merefield/grpc-user-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/merefield/grpc-user-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/merefield%2Fgrpc-user-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/merefield%2Fgrpc-user-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/merefield%2Fgrpc-user-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/merefield%2Fgrpc-user-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/merefield","download_url":"https://codeload.github.com/merefield/grpc-user-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/merefield%2Fgrpc-user-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28439531,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T22:37:52.437Z","status":"ssl_error","status_checked_at":"2026-01-14T22:37:31.496Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-01-14T23:44:32.968Z","updated_at":"2026-01-14T23:44:33.781Z","avatar_url":"https://github.com/merefield.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grpc-user-api\n\nThis is a significant evolution of @blushi's [original Golang-based user-api](https://github.com/resonatecoop/user-api)\n\nThe changes are so significant a new repo was created, but a lot of code lives on from that repo.\n\nIt builds on that work in several important ways:\n\n- drops Twirp framework in favour of [GRPC-Gateway](https://grpc-ecosystem.github.io/grpc-gateway/) which has gained significant traction\n- implements full OpenAPIV2 workflow - write interfaces in protobufs and generate the code stubs, then implement them.\n- exposes full Swagger UI automatically (currently 100% not seamless, WIP)\n- implements full RBAC using native Golang Interceptors (arguably better than using Twirp Handlers)\n- RBAC is based on User role and interface access config in the config file\n- built with Go modules for dependency management\n\nIt is WIP\n\n## Running\n\nRunning `main.go` starts a web server on https://0.0.0.0:11000/. You can configure\nthe port used with the `$PORT` environment variable, and to serve on HTTP set\n`$SERVE_HTTP=true`.\n\n```\n$ go run main.go\n```\n\nAn OpenAPI UI is served on https://0.0.0.0:11000/.\n\n### Running the standalone server\n\nIf you want to use a separate gRPC server, for example one written in Java or C++, you can run the\nstandalone web server instead:\n\n```\n$ go run ./cmd/standalone/ --server-address dns:///0.0.0.0:10000\n```\n\n## Getting started\n\nAfter cloning the repo, there are a couple of initial steps;\n\n1. Install the generate dependencies with `make install`.\n   This will install `buf`, `protoc-gen-go`, `protoc-gen-go-grpc`, `protoc-gen-grpc-gateway`,\n   `protoc-gen-openapiv2` and `statik` which are necessary for us to generate the Go, swagger and static files.\n1. If you forked this repo, or cloned it into a different directory from the github structure,\n   you will need to correct the import paths. Here's a nice `find` one-liner for accomplishing this\n   (replace `yourscmprovider.com/youruser/yourrepo` with your cloned repo path):\n   ```bash\n   $ find . -path ./vendor -prune -o -type f \\( -name '*.go' -o -name '*.proto' \\) -exec sed -i -e \"s;github.com/merefield/grpc-user-api;yourscmprovider.com/youruser/yourrepo;g\" {} +\n   ```\n1. Finally, generate the files with `make generate`.\n\nNow you can run the web server with `go run main.go`.\n\n## Maintenance\n\nInterfaces are designed in\n`proto/` directory. See https://developers.google.com/protocol-buffers/\ntutorials and guides on writing protofiles.\n\nOnce that is done, regenerate the files using\n`make generate`. This will mean you'll need to implement any functions in\n`server/`, or else the build will fail since your struct won't\nbe implementing the interface defined by the generated file in `proto/example.pb.go`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmerefield%2Fgrpc-user-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmerefield%2Fgrpc-user-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmerefield%2Fgrpc-user-api/lists"}