Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Cratis Protocol Generation

Automatic gRPC contract generation for [Cratis Arc](https://github.com/Cratis/Arc) backends — generates
[protobuf-net](https://github.com/protobuf-net/protobuf-net.Grpc)-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](./Source/Generator/README.md)** — 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](./Source/Generator.Build/README.md)** — 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](https://www.cratis.io) — free, MIT-licensed tools for building
event-sourced and CQRS applications:

- **[Arc](https://github.com/Cratis/Arc)** — opinionated CQRS framework for ASP.NET Core with commands,
queries, validation, authorization, and TypeScript proxy generation. [Docs](https://www.cratis.io/arc/)
- **[Chronicle](https://github.com/Cratis/Chronicle)** — event-sourcing database and processing runtime
with a first-class .NET SDK. [Docs](https://www.cratis.io/chronicle/)
- **[Fundamentals](https://github.com/Cratis/Fundamentals)** — shared building blocks, including the
concepts used by this generator.

## License

[MIT](./LICENSE)
Loading