{"id":22213955,"url":"https://github.com/xmlking/grpc-starter-kit","last_synced_at":"2025-07-27T12:31:56.297Z","repository":{"id":36999047,"uuid":"272267057","full_name":"xmlking/grpc-starter-kit","owner":"xmlking","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-03T20:15:07.000Z","size":10030,"stargazers_count":47,"open_issues_count":15,"forks_count":5,"subscribers_count":5,"default_branch":"develop","last_synced_at":"2024-06-19T01:57:13.107Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/xmlking.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["xmlking"],"open_collective":"xmlking"}},"created_at":"2020-06-14T19:11:00.000Z","updated_at":"2024-06-13T06:15:43.000Z","dependencies_parsed_at":"2024-06-19T01:33:55.818Z","dependency_job_id":"05967d84-fc2b-4417-a9ab-d61d7be82d70","html_url":"https://github.com/xmlking/grpc-starter-kit","commit_stats":{"total_commits":185,"total_committers":4,"mean_commits":46.25,"dds":"0.10810810810810811","last_synced_commit":"d6dffc67bc50b828bde4010c68781e6fd77ba924"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Fgrpc-starter-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Fgrpc-starter-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Fgrpc-starter-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Fgrpc-starter-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xmlking","download_url":"https://codeload.github.com/xmlking/grpc-starter-kit/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227802821,"owners_count":17822113,"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-02T21:12:43.327Z","updated_at":"2024-12-02T21:12:43.953Z","avatar_url":"https://github.com/xmlking.png","language":"TypeScript","funding_links":["https://github.com/sponsors/xmlking","https://opencollective.com/xmlking"],"categories":[],"sub_categories":[],"readme":"# grpc-starter-kit\n\nMicroservices starter kit for **Golang**, aims to be developer friendly.  \nAn _open source_ framework for building and deploying distributed applications. This template _monorepo_ style project allows you to write your application as a modular monolith and deploy it as a set of microservices.\n\n[![GoDoc](https://godoc.org/github.com/xmlking/grpc-starter-kit?status.svg)](https://godoc.org/github.com/xmlking/grpc-starter-kit)\n[![Go](https://img.shields.io/github/go-mod/go-version/xmlking/grpc-starter-kit/develop)](https://golang.org/dl/)\n[![Renovate dependency Status](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com/)\n[![MIT license](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)\n\n### Build Status\n[![Build Status](https://github.com/xmlking/grpc-starter-kit/workflows/Test%20on%20Push/badge.svg?branch=develop)](https://github.com/xmlking/grpc-starter-kit/actions?query=branch%3Adevelop+event%3Apush+workflow%3A%22Test+on+Push%22)\n\n### Quality\n[![Go Report Card](https://goreportcard.com/badge/github.com/xmlking/grpc-starter-kit)](https://goreportcard.com/report/github.com/xmlking/grpc-starter-kit)\n[![Total alerts](https://img.shields.io/lgtm/alerts/g/xmlking/grpc-starter-kit.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/xmlking/grpc-starter-kit/alerts/)\n[![codecov](https://codecov.io/gh/xmlking/grpc-starter-kit/branch/develop/graph/badge.svg)](https://codecov.io/gh/xmlking/grpc-starter-kit)\n[![Language grade: Go](https://img.shields.io/lgtm/grade/go/g/xmlking/grpc-starter-kit.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/xmlking/grpc-starter-kit/context:go)\n\n\n## Overview\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/images/deployment.drawio.svg\" width=\"60%\"\u003e\n\u003c/p\u003e\n\n### What you get\n\n- [x] Monorepo - Sharing Code Between Microservices\n- [x] gRPC microservices\n- [x] Versatile ingress gateway based on Envoy with Config Manager [esp-v2](https://github.com/GoogleCloudPlatform/esp-v2)\n- [ ] Proxy-less Service Discovery and xDS based gRPC Load Balancer with [Traffic Director](https://cloud.google.com/blog/products/networking/traffic-director-supports-proxyless-grpc)\n- [x] Input Validation with [protoc-gen-validate (PGV)](https://github.com/envoyproxy/protoc-gen-validate)\n- [x] Add/replace struct tags on generated protobuf messages [protoc-gen-gotag (PGGT)](https://github.com/srikrsna/protoc-gen-gotag)\n- [x] Config - Pluggable Sources, Mergeable Config, Environment Overlays\n- [x] Customizable Logging\n- [x] Flexible [errors](https://github.com/cockroachdb/errors) lib: _PII-free, gRPC middleware, opt-in Sentry.io reporting_\n- [x] Graph-Based ORM [ent](https://entgo.io/)\n- [x] CRUD API with [ent](https://entgo.io/blog/2021/03/18/generating-a-grpc-server-with-ent/)\n- [x] Dependency injection [Container](https://github.com/sarulabs/di), Try [wire](https://itnext.io/mastering-wire-f1226717bbac) next?\n- [ ] Adaptive System Protection / Adaptive concurrency limits with \n        [Alibaba's Sentinel](https://github.com/alibaba/sentinel-golang/wiki), \n        [Netflix's concurrency-limits](https://medium.com/@NetflixTechBlog/performance-under-load-3e6fa9a60581), \n        [go-concurrency-limits](https://github.com/platinummonkey/go-concurrency-limits)\n- [x] multi-stage-multi-target Dockerfile\n- [x] [Reproducible builds](https://reproducible-builds.org/) and [Verifiable Builds](https://goreleaser.com/customization/verifiable_builds/) with [GoReleaser](https://goreleaser.com/customization/build/#reproducible-builds)\n- [x] One Step _build/publish/deploy_ with [ko](https://github.com/google/ko)\n- [x] BuildInfo with [govvv](https://github.com/ahmetb/govvv)\n- [ ] Switch to [Bazel Build](https://bazel.build/)\n- [x] Linting with [GolangCI](https://github.com/golangci/golangci-lint) linters aggregator\n- [x] Linting Protos with [Buf](https://buf.build/docs/introduction)\n- [x] Linting rest with [super-linter](https://github.com/github/super-linter/blob/master/docs/disabling-linters.md)\n- [x] CICD Pipelines with [GitHub Actions](https://github.com/features/actions)\n- [x] Kubernetes _Matrix Deployment_ with [Kustomize](https://kustomize.io/)\n- [ ] Add k8s [healthchecks](https://github.com/heptiolabs/healthcheck) with [cmux](https://medium.com/@drgarcia1986/listen-grpc-and-http-requests-on-the-same-port-263c40cb45ff)\n- [x] Feature Flags \u0026 [Feature Gating](https://codeburst.io/designing-feature-gates-with-firebase-8b2a2394a88e) (enable/disable with zero cost)\n- [x] Observability via [OpenTelemetry](https://github.com/open-telemetry/opentelemetry-go)\n- [ ] Service Mesh with [Istio](https://istio.io/)\n- [ ] GraphQL Gateway with [gqlgen](https://gqlgen.com/), [rejoiner](https://github.com/google/rejoiner),[gqlgen](https://github.com/Shpota/skmz)\n- [ ] Graceful / zero downtime upgrades [tableflip](https://github.com/cloudflare/tableflip)\n- [ ] Cache — Ephemeral key-value storage with TTLs\n- [ ] Secondary Index  — Ephemeral Index with Redis Search\n- [ ] Crypto — App-level data encryption/decryption with Key Management\n- [ ] Auth — API Authentication with OpenID Connect, JWT, WebAuthN/[Passwordless](https://github.com/teamhanko/apple-wwdc21-webauthn-example) Login\n- [ ] [Zero Trust](https://smallstep.com/docs/practical-zero-trust) or [BeyondProd](https://cloud.google.com/security/beyondprod) style e2e Security\n- [ ] **mTLS**\n  - [ ] _Option 1 (noCert)_: With **Application LayerTransport Security** [(ALTS)](https://github.com/salrashid123/grpc_alts)\n  - [ ] _Option 2 (autoCert)_: With [AutoCert](https://github.com/smallstep/autocert/tree/master/examples/hello-mtls/go-grpc)\n  - [ ] _Option 3 (Step xDS)_: With Smallstep's Secret Discovery Service [SDS](https://github.com/smallstep/step-sds)\n- [ ] [supply-chain](https://github.com/goreleaser/supply-chain-example) GoReleaser + Go Mod proxying + Cosign keyless signing + Syft SBOM generation example.\n- [ ] [Multi-arch container image ]()\n- [ ] [gkit](https://github.com/songzhibin97/gkit)\n- [ ] [Continuous Profiling for Go Applications](https://betterprogramming.pub/continuous-profiling-go-applications-8cdbdfdfc5ab) with [Pyroscope](https://github.com/grafana/pyroscope)\n## Getting Started\n\n### Prerequisite\n\nRefer [prerequisites](docs/introduction/prerequisites.md) docs\n\n### Initial Setup\n\nAlso Refer [scaffolding](docs/introduction/scaffolding.md) docs\n\n\u003e clone the repo\n\n```bash\ngit clone https://github.com/xmlking/grpc-starter-kit ~/Developer/Work/go/grpc-starter-kit\n# pull dependencies (when every time `go.mod` changed)\ngo mod download\n```\n\n### Run\n\n#### Database\n\nBy default, this project use embedded `sqlite3` database. if you want to use **postgreSQL**,\n\n- start **postgres** via `docker-compose` command provided below\n- uncomment `postgres` import statement and comment `sqlite` in `main.go`\n- start micro server with `export export CONFY_FILES=/config/config.yml,/config/config.pg.yml` flag \u003cbr/\u003e\n  i.e., `CONFY_FILES=/config/config.yml,/config/config.pg.yml go run service/account/main.go`\n\n```bash\n# to start postgres in foreground\ndocker-compose up postgres\n# to stop postgres\ndocker-compose down\n# if needed, remove `postgres_data` volume to recreate database next time, when you start.\ndocker system prune --volumes\n```\n\n#### Services\n\n\u003e Node: `--server_address=localhost:5501x --broker_address=localhost:5502x` required only when you are behind VPN a.k.a `Work From Home`\n\n```bash\n# dev mode\nmake run-recorder\n\nmake run-emailer\n\nmake run-greeter\n\nmake run-account\n\n# experiments \nmake run-cedemo\nmake run-play\nmake run-xds\n```\n\n\u003e optionally specify any **Confy** environment variable\n\n```bash\n```shell\nexport CONFY_ENV=production\nexport CONFY_FILES=/config/config.yml\n# (or) export CONFY_FILES=/config/config.yml,/config/config.pg.yml\nexport CONFY_DEBUG_MODE=true\nexport CONFY_VERBOSE_MODE=true\nexport CONFY_SILENT_MODE=true\nexport CONFY_ENV=production\n\nexport CONFY_ENV_PREFIX=APP\nexport APP_FEATURES_TLS_ENABLED=true\nmake run-account\n```\n\n### Test\n\nRefer [testing](docs/testing/testing.md) docs\n\n## GitOps\n\n### Make\n\nRefer [makefile](docs/introduction/makefile.md) docs\n\n### Docker\n\nRefer [docker](docs/devops/docker.md) docs\n\n### Release\n\nRefer [releasing](docs/concepts/releasing.md) docs\n\n### Deploy\n\n```bash\nmake docker DOCKER_REGISTRY=ghcr.io DOCKER_CONTEXT_PATH=xmlking/grpc-starter-kit\ndocker rmi $(docker images -f \"dangling=true\" -q)\n\n# make kustomize OVERLAY=e2e NS=default VERSION=v0.1.0-440-g6c7fb7a\nmake kustomize\nkubectl apply -f build/kubernetes.yaml\n\nPOD_NAME=$(kubectl get pods  -lapp.kubernetes.io/name=account-srv -o jsonpath='{.items[0].metadata.name}')\nkubectl logs -f -c srv $POD_NAME\n\nkubectl delete -f build/kubernetes.yaml\n```\n\n## Reference\n\n### Project Docs\n\n1. [prerequisites](docs/introduction/prerequisites.md)\n2. [scaffolding](docs/introduction/scaffolding.md)\n3. [makefile](docs/introduction/makefile.md)\n4. [testing](docs/testing/testing.md)\n5. [docker](docs/devops/docker.md)\n6. [gitops](docs/advanced/gitops.md)\n7. [Protobuf Style Guide](https://buf.build/docs/style-guide)\n8. [Google Protobuf Style Guide](https://github.com/uber-go/guide/blob/master/style.md)\n9. [Spine Protobuf Style Guide](https://spine.io/docs/introduction/naming-conventions)\n\n### External Docs\n1. [Go Repo Layout](https://christine.website/blog/within-go-repo-layout-2020-09-07)\n2. [examples](https://github.com/micro/examples) - example usage code for micro\n3. [microhq](https://github.com/microhq) - a place for prebuilt microservices\n4. [explorer](https://micro.mu/explore/) - which aggregates micro based open source projects\n5. [micro-plugins](https://github.com/micro/go-plugins) extensible micro plugins\n6. [step-by-step-guide-micro](https://github.com/micro-in-cn/tutorials/tree/master/microservice-in-micro)\n7. [micro-in-cn](https://github.com/micro-in-cn/tutorials/tree/master/examples)\n8. [Platform Web](https://github.com/micro-in-cn/platform-web)\n9. [grpc template](https://github.com/vtolstov/micro-template-grpc)\n10. [Simple API backed by PostgresQL, Golang and gRPC](https://medium.com/@vptech/complexity-is-the-bane-of-every-software-engineer-e2878d0ad45a)\n11. [securing gRPC connections with TLS](https://itnext.io/practical-guide-to-securing-grpc-connections-with-go-and-tls-part-2-994ef93b8ea9) via [certify](https://github.com/johanbrandhorst/certify)\n12. [Google Service Weaver: A Framework for Writing Distributed Applications](https://opensource.googleblog.com/2023/03/introducing-service-weaver-framework-for-writing-distributed-applications.html)\n\n## 🔗 Credits\n- [atlas-app-toolkit](https://github.com/infobloxopen/atlas-app-toolkit)\n- [dapr](https://github.com/dapr/dapr)\n- [goyave](https://github.com/System-Glitch/goyave)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmlking%2Fgrpc-starter-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxmlking%2Fgrpc-starter-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmlking%2Fgrpc-starter-kit/lists"}