grpc-gen

command module
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 3 Imported by: 0

README

grpc-gen

🌐 English · Tiếng Việt

Scaffold a full-stack gRPC system — services, GraphQL gateway, and a runtime business-rule engine — from .proto files in three commands.

CI Release Go Reference

grpc-gen turns Protocol Buffers into a working production stack. You write the schema; the tool generates the gRPC services, a GraphQL gateway in front of them, and a Mongo-backed engine for business rules, row-level security, and multi-step compute actions — all wired together with TLS, structured logging, DataLoaders, and Dockerfiles.

go install github.com/thailymmo/grpc-gen@latest

grpc-gen init my-app                    # bootstrap project
grpc-gen add-service user 50051         # add a gRPC service
grpc-gen add-gateway                    # add GraphQL gateway + engine

What you get

Layer Command Output
Services add-service gRPC CRUD handlers, MySQL pool, filter/pagination, Dockerfile
Gateway add-gateway GraphQL schema, resolvers, DataLoaders, @auth directive, REST admin API
Engine (auto-wired) Mongo-backed business rules, RLS, action pipelines, hot-reload

The engine is data-driven — rules, scopes, and actions are Mongo documents, not code. Add validation, change permissions, or wire up a computed field by editing a document and calling the reload endpoint. No rebuild.

See docs/architecture.md for the full layered view.

Installation

go install github.com/thailymmo/grpc-gen@latest

The binary lands in $(go env GOPATH)/bin/grpc-gen — make sure that's on your $PATH.

Prebuilt binaries

Grab the archive for your OS/arch from the Releases page (linux / macOS / windows × amd64 / arm64), extract, and run grpc-gen.

From source
git clone https://github.com/thailymmo/grpc-gen.git
cd grpc-gen
go build -o grpc-gen .
Requirements
  • Go 1.24+
  • protoc (Protocol Buffers compiler)
  • MySQL 8.0+, MongoDB 7+ (replica-set), Redis 7+ — for generated projects

Quick start

grpc-gen init blog
cd blog

grpc-gen add-service post 50051
# edit proto/post/post.proto — define your entity
make proto-post && make gen-post

./scripts/run-blog.sh

Read the full walkthrough in docs/getting-started.md.

Documentation

Topic Doc
Getting started — first project in 10 minutes docs/getting-started.md
CLI command reference docs/cli-reference.md
Architecture & design overview docs/architecture.md
GraphQL gateway internals docs/gateway.md
Business engine — rules, RLS, actions docs/gateway.md
Contributing CONTRIBUTING.md
Security policy SECURITY.md
Release notes CHANGELOG.md

Status

Early-stage but production-tested against two real applications (an LMS and a thesis-management system, ~700 integration tests each). API may change in minor pre-1.0 releases; releases follow semver once a v1.x is cut.

License

MIT — see LICENSE.

Documentation

Overview

Command grpc-gen scaffolds a full-stack gRPC system — services, a GraphQL gateway, and a runtime business-rule engine — from .proto files in three commands.

Quick start:

grpc-gen init my-app
grpc-gen add-service user 50051
grpc-gen add-gateway

What you get:

  • gRPC CRUD handlers per service (MySQL, filters, pagination, TLS)
  • GraphQL gateway with resolvers, DataLoaders, @auth directive
  • Mongo-backed engine for business rules, row-level security, and action pipelines — all hot-reloadable without rebuilding

See https://github.com/thailymmo/grpc-gen for the full walkthrough, architecture overview, and CLI reference.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL