klok-common

Overview

klok-common is the dependency-free library at the bottom of the Klok platform: the one place where every part of the system defines the names, conventions, and access rules that must match exactly. The Java broker client, the Quarkus extension, and the Gradle plugin depend on it, and every integration inherits it through the extension. It holds the topic naming and provisioning rules, the klok-* message properties and the three correlation ids, the CloudEvents attributes, the @KlokDocs annotation, small utilities, and the shared Klok knowledge blocks. It also defines who may do what: Keycloak groups to roles, roles to GitLab memberships, so the platform’s tools and clients give the same answer for the same person.

The contract behind those rules is published as data: the wire contract, one JSON file plus six fixture files, shipped inside the jar and as a separate zip. Java constants are asserted against it, and clients in other languages (the TypeScript and Python broker clients, klok.dev) vendor the same files and run the same cases, so the names that reach the broker agree across every implementation. The library keeps no Camel, Quarkus or Pulsar dependency on purpose, which lets any layer depend on it without pulling in a runtime and lets the build resolve from Maven Central alone.

Where this documentation comes from

This site is written by KlokDocumentationEgress from the project's code, its hand written klok-docs/ folder and the tenant's documentation generation settings, on every main pipeline of klok/framework/klok-common. Nobody edits it by hand.

To change Edit
Hand written pages, their order, and where a generated section appears in them klok-docs/ in klok/framework/klok-common
What is generated and how: chapters, sections, prompts, languages, model klok.dev, Tenant Administration, Documentation generation