Set Up The Integration Landscape
A clean integration starts before code. The first task is to describe the landscape in the same concepts that the platform, repositories, access rules, documentation, and context graph will use.
Step 1: Confirm Tenant Scope
A tenant is the organizational boundary. Data does not cross tenant boundaries implicitly. Confirm:
- Which tenant owns the business need.
- Which tenant owns each source or target system.
- Whether another tenant needs shared access or a translated bridge.
- Which roles should be able to view, edit, publish, or operate the solution.
Only roles with the right global or tenant-level permissions should create tenants or perform tenant-wide administration.
Step 2: Confirm Domain Scope
A domain is the functional or information boundary inside a tenant. Confirm:
- The owning domain for the solution.
- The domain that owns each data model.
- Whether shared/common data belongs in a common domain.
- Whether public data contracts are needed for external reuse.
Domains should own their data contracts and access policies. Do not create a technical domain just to avoid ownership conversations.
Step 3: Register Systems
Register the systems involved in the flow. A system can be an API, database, file source, SaaS platform, internal app,
queue, or other integration endpoint. klok.dev lists the systems under Build → Systems, one per group under
<tenant>/datamodel/system/ in GitLab, and a system's documentation lives in systems/<system>/ of the tenant's
integration-solutions repository.
Capture enough information to design safely:
- System owner and support contact.
- Protocol and connection method.
- Authentication and secret requirements.
- Source or target data format.
- Rate limits, batch windows, and latency expectations.
- Whether the system produces or consumes events, files, API calls, or scheduled extracts.
klok.dev cannot register a system in production today. Its system documentation editor works in a clone of
integration-solutions that klok.dev can only make over SSH, for which it has no key, and it never pushes its commit
(frontend-klok-dev#79,
frontend-klok-dev#100); creating a system's
starter projects pushes over SSH as well. So make the system's group in GitLab, write its documentation in a merge
request to integration-solutions, and make the projects by hand (Step 6). How klok.dev reads systems is on its
Systems and the integration
context page.
Step 4: Create Or Update The Integration Solution
An integration solution groups route legs around a business capability. It gives the work a stable identity,
documentation home, and route prefix: the solution id <TENANTSHORT><NNN> that starts every route id of the solution.
The solution is described in its solution document, solutions/<SOLUTIONID>_<slug>/README.md in the tenant's
integration-solutions repository, written before the first route. klok.dev lists the solutions under Build →
Solutions and reads them from GitLab, so a solution added by hand in a merge request to the repository shows up there
the same way. The document covers the business need and outcome, the scope, the systems, what the solution reuses, the
datamodel, the services by kind, the legs, the flows, the service levels, security and tenant isolation, the tactical
decisions and the open questions.
The business starts it with Describing The Business Need, the architect completes it with From Requirement To Design, and Reviewing A Solution Document explains what each section answers.
Step 5: Decide Information Models
Before creating routes, decide which data model should exist on the broker. Any of the four classes may be sent over the broker, but data that several systems or domains read should travel as Class B or Class C, not in one system's format.
If no suitable model exists, create a new model (see Creating A Datamodel; New model on Build → Datamodels helps you design its schema) or version an existing model. If a change is breaking, create a new major version rather than overwriting an existing contract.
Step 6: Create Integration Projects
Create integration projects when the solution and data model decisions are clear. Today they are made by hand from the
template klok/environment/project-template-integration; New integration on Build → Integration projects does
not create a repository (tracked in
frontend-klok-dev#42). What a new project needs
before it can be deployed is described in Onboarding A
Tenant, section New
Integration Project.
The repository is the durable source for implementation changes.
Setup Checklist
- [ ] Tenant is correct.
- [ ] Domain owner is clear.
- [ ] Source and target systems are registered.
- [ ] Integration solution exists and has a stable key/prefix.
- [ ] Data models are selected or planned.
- [ ] Route pattern decisions are recorded.
- [ ] Access requirements are known.
- [ ] Project and documentation repositories are created from templates.
- [ ] Kloker has enough context to analyze or assist.