# Architecture

This is the high level architecture of the platform

![](/files/CKvEvv9nwMI602IbA4bM)

Component descriptions:

* Terrakube API:
  * Expose a JSON:API or GraphQL API providing endpoints to handle:
    * Organizations.
    * Workspace API with the following support:
      * Terraform state history
      * Terraform output history
      * Terraform Variables (public/secrets)
      * Environment Variables (public/secrets)
      * Cron like support to schedule the jobs execution programmatically
    * Job.
      * Custom terraform flows based on Terrakube Configuration Language
    * Modules
    * Providers
    * Teams
    * Teamplate
* Terrakube Jobs:
  * Automatic process that check for any pending job operations in any workspace to trigger a custom logic flow based on Terrakube Configuration Language
* Terrakube Executor:
  * Service that executes the Terrakube job operations written in Terrakube Configuration Language, handle the terraform state and outputs using cloud storage providers like Azure Storage Account
* Terrakube Open Registry:
  * This component allows to expose an open source private repository protected by Dex that you can use to handle your company private terraform modules or providers.
* Cloud Storage:
  * Cloud storage to handle terraform state, outputs and terraform modules used by terraform CLI
* RDBMS:
  * The platform can be used with any database supported by the Liquibase project.
* Security:
  * All authentication and authorization is handle using [Dex](https://dexidp.io/).
* Terrakube CLI:
  * Go based CLI that can communicate with the Terrakube API and execute operation for organizations, workspaces, jobs, templates, modules or providers
* Terrakube UI:
  * React based frontend to handle all Terrakube Operations.

{% hint style="info" %}
Terrakube can installed in any kuberentes cluster using any cloud provider. We provide a Helm Chart that can be found in the following [link](https://github.com/AzBuilder/terrakube-helm-chart).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.terrakube.io/getting-started/design-and-architecture.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
