About this project

Kratos is a lightweight Go framework aimed at building cloud-native microservices. It exposes small, explicit APIs covering transport, middleware, registry, configuration, logging, encoding and code generation, so that application code can concentrate on business logic. Key capabilities described in the README: - API-first development using Protobuf, with generated HTTP and gRPC code. - A unified transport layer that handles both HTTP and gRPC servers. - Composable middleware for concerns such as recovery, logging, validation, tracing, metrics and authentication. - Pluggable registry, configuration and encoding components, allowing different backends to be swapped in. - Logging built on the standard library log/slog, with OpenTelemetry extensions available through contrib packages. - Consistent handling of metadata, errors, validation, OpenAPI and code-generation workflows. - A contrib ecosystem for optional integrations including registries, config stores, middleware, encodings and observability. Getting started requires Go 1.25 or later, protoc and protoc-gen-go. The CLI is installed with go install, after which kratos new scaffolds a service, kratos proto add/client/server generate Protobuf artifacts, and kratos run starts the service. A minimal example shows creating HTTP and gRPC servers, registering them with kratos.New, and calling app.Run. The project notes that v3 reduces core dependencies and makes previously implicit behavior explicit, and points readers to a v2-to-v3 migration guide before upgrading production services. Further resources include official documentation, an examples repository, a recommended project layout, and a community contribution guide. Development tasks are run through make test and make lint. Community channels include documentation, a WeChat group, Discord and GitHub Discussions. Security issues are handled privately via a dedicated email address. The project is MIT licensed and acknowledges influence from go-kit, go-micro, go-cloud, go-zero and beego.