A centralized, "single source of truth" for gRPC service definitions. This repository manages .proto files, handles linting/formatting via Buf v2, and generates type-safe TypeScript code for downstream services.
- Clone the repository.
- Run the initialization suite:
make all
We use a Makefile to automate the Protobuf lifecycle. This ensures consistency across all development environments.
| Command | Description |
|---|---|
make format |
Automatically fix indentation and style in .proto files. |
make lint |
Run the Buf linter (ignores Google internal protos). |
make generate |
Clean the gen/ directory and regenerate TypeScript code. |
make commit |
Interactive: Build a Conventional Commit with numeric type selection. |
.
├── proto/ # Raw .proto definitions
│ └── services/ # Domain-specific services
├── codegen/ # Generated code (Git ignored)
├── buf.yaml # Buf v2 configuration (Lint/Breaking rules)
├── buf.gen.yaml # Generation strategy (Plugins)
└── Makefile # Automation engine
This project follows the Conventional Commits specification. When using make commit-pro, you will be prompted to select a type:
- feat: A new feature (e.g., a new RPC or message).
- fix: A bug fix in a definition or configuration.
- chore: Maintenance (updating dependencies, CI/CD).
- docs: Changes to documentation or comments.
- refactor: Rearranging protos without changing logic.
- style: Formatting changes only.
Format: <type>(<scope>): <subject>
To use the generated TypeScript definitions in your application:
- Install dependencies:
npm install @bufbuild/protobuf @connectrpc/connect @connectrpc/connect-web
- Import code:
import { UserService } from "./gen/ts/services/v1/user_connect";
Internal Proprietary / MIT (Choose your license)