Skip to content

Repository files navigation

Cratis Protocol Generation

Automatic gRPC contract generation for Cratis Arc backends — generates protobuf-net-compatible C# service interfaces directly from your commands and queries, and exposes them automatically at runtime. No hand-written .proto files, no manual service wiring.

This repository is an exploration; APIs and conventions may change.

What's inside

  • Generator — CLI tool that scans an assembly for types marked [Command], [Query], or [ObservableQuery], groups them into services by [BelongsTo], and generates gRPC service interfaces. Unwraps ConceptAs<>, supports OneOf<>, DateTimeOffset, and observable queries as streams.
  • Generator.Build — MSBuild integration that runs the generator automatically as part of the build.
  • Server — ASP.NET Core host that discovers generated service contracts at runtime and routes calls to the right command or query through Arc's command and query pipelines, with gRPC reflection enabled.
  • Backend / Interfaces / Client — a small sample backend, its generated contracts, and a console client used to exercise the whole flow end to end.

The Cratis ecosystem

This project is part of Cratis — free, MIT-licensed tools for building event-sourced and CQRS applications:

  • Arc — opinionated CQRS framework for ASP.NET Core with commands, queries, validation, authorization, and TypeScript proxy generation. Docs
  • Chronicle — event-sourcing database and processing runtime with a first-class .NET SDK. Docs
  • Fundamentals — shared building blocks, including the concepts used by this generator.

License

MIT

About

No description or website provided.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages