# How it works

> The path from an idea to a governed production app, where each part runs and who is responsible for what.

Source: https://diakrin.com/docs/how-it-works

Diakrin splits the work between three places: the builder's computer, where a coding agent writes the code; the Diakrin control plane, which holds policy, approvals and audit; and your cloud account, where apps are built, checked and run.

```diagram lifecycle
Every app follows the same path. Diakrin plans, validates and approves the release before anything reaches production, and keeps observing the app for as long as it runs.
```

## From idea to production

```steps
Describe the app | Builder | Name the app and explain what it should do, who will use it and what data it needs. IT can prepare the app and assign builders first.
Build it with a coding agent | Builder + agent | The agent connects through MCP or the CLI, reads the app's approved requirements and writes the code. Source is saved to your company's source service.
Build and scan in your cloud | Your cloud + source | The Diakrin runner builds an immutable image from an exact source commit and a pinned template, and scans it inside your account.
Plan the release | Diakrin | Diakrin prepares the release plan: the exact image, target environment, cost estimate, access implications and expiry.
Validate against your rules | Diakrin | Diakrin checks the plan against your company's rules: approved capabilities and data grants, the app's budget ceiling, the reviewed template and the approval policy. A failed rule blocks the release with a reason the builder and agent can act on.
Approve | Diakrin · IT reviewer | Under your approval policy, an eligible reviewer who is not the requester approves or denies the exact plan in Diakrin.
Deploy and verify | Your cloud + source | The approved release is deployed in your account. It counts as live only when fresh, server-verified evidence matches the promoted image.
Observe while it runs | Diakrin | IT and the builder track health, cost, data and activity for every app, and can change its audience, control its data, stop its runtime or roll back through a new reviewed plan.
```

## Where each part runs

| Part | Runs in | Holds |
| --- | --- | --- |
| Console, API and MCP server | Diakrin | App definitions, policies, approvals, memberships, cost accounting and audit |
| Diakrin runner | Your cloud | Builds, scans and deployments; reports metadata back |
| Your apps | Your cloud | Each app's service, database, file storage, secrets and logs |
| Coding agent and CLI | The builder's computer | Local source and the builder's personal connection |
| Identity provider | Your identity provider | Employee identities, MFA and SSO assignment |

> [!SELF-HOSTED]
> The console, API and MCP server also run in your cloud, as one installation for your organization. People sign in with accounts on that installation, not through Diakrin's hosted sign-in.

## Bring your own cloud (BYOC)

With BYOC, Diakrin runs the control plane and your cloud account is the data plane. Diakrin coordinates: it holds policy, approvals and audit. Your account executes: it builds, runs and stores.

| Crosses the boundary | Stays in your cloud |
| --- | --- |
| App definitions, policies, approvals and cost accounting | App databases, files and logs |
| Sizes and names reported by the runner, such as table names and row estimates | Row values, file contents and secret values |
| Scoped requests from Diakrin, and signed receipts back | Source builds, images and running apps |

Who is responsible for what:

| Area | Diakrin | Your company |
| --- | --- | --- |
| Control plane | Runs, secures and upgrades it | Nothing to run |
| Cloud account | Works only through the access you grant | Owns the account, its billing and its organization policies |
| Infrastructure templates | Publishes reviewed, versioned templates | Reviews and approves each one before it is applied |
| Apps | Checks, deploys and observes them under your policy | Decides who builds, who approves and who can open each app |
| Identity | Brokers sign-in and checks membership | Owns the identity provider, MFA and assignments |

## Trust boundaries in practice

- **Diakrin reaches your cloud only through access you create.** On AWS, you create one `DiakrinAccess` stack per account: a reader, a controller and a separate CloudFormation execution role, with every resource tagged and every created role capped by a boundary. On Google Cloud, you approve keyless workload identity in the project you choose, so no service-account key exists. See [Set up your company cloud](/docs/company-cloud).
- **Company credentials never pass through a coding tool.** An authorized owner enters them on a customer-hosted form, and the app and the employee each still need an approved grant.
- **Every action is checked on the server.** Console, API, CLI and MCP calls are authorized against the person's current role. Saved selections and cached links never replace a fresh check.
- **Each step leaves evidence.** Operations keep their stages, receipts and approvals, so you can see what happened and who approved it in the app's **Deployment** view.

## The three ways in

### The console

Builders describe and follow their apps. IT invites people, sets budgets and policy, reviews requests and releases, and sees every app's cost, data and activity in one place.

### Coding tools

Claude Code, Cursor, Codex and other MCP-capable tools connect with the builder's own permissions. The [Diakrin CLI](/docs/cli) gives terminals and agents the same capabilities.

### Company apps

Employees open an app's address and sign in with your company sign-in. They never need the console, the coding tools or any cloud access.

## Read next

- [Key concepts](/docs/concepts) explains apps, setups, capabilities, grants and the states an app moves through.
- [Get started](/docs/get-started) lists who does what during onboarding.
