> ## Documentation Index
> Fetch the complete documentation index at: https://docs.streambuild.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Declarative streaming data pipelines for ClickHouse.

StreamBuild compiles typed SQL models into ClickHouse tables and materialized views, plans their
dependencies, and rebuilds them from retained streaming history.

It supports two operational workflows:

* **Direct mode** is the default. `stb build` rebuilds selected models at their ordinary names and
  replays retained history without a publish step.
* **Virtual environments** are an explicit opt-in. `stb backfill` creates deployment-specific
  tables, `stb audit backfill` assesses them, and `stb publish` switches stable views.

## What StreamBuild manages

* Strict, explicitly typed `MODEL()` SQL
* Managed Kafka landing through ClickHouse's Kafka engine
* Adopted ClickHouse stream tables that StreamBuild does not own
* Materialized-view dependency graphs with driving and side-reference edges
* Inclusive, at-least-once replay across offset, timestamp, landed-at, and cursor boundaries
* SQL-native model tests, macro tests, and data-quality audits
* Offline compile artifacts for review and automation

StreamBuild currently supports ClickHouse only. It does not provide dbt compatibility, authored
seeds, UDF management, or a generic multi-warehouse abstraction.

## Choose a workflow

<CardGroup cols={2}>
  <Card title="Direct-mode quickstart" icon="bolt" href="/quickstart">
    Build a small adopted-source pipeline against local ClickHouse.
  </Card>

  <Card title="Direct mode" icon="arrows-rotate" href="/concepts/direct-mode">
    Understand destructive rebuilds, replay, failure, and rerun behavior.
  </Card>

  <Card title="Virtual environments" icon="code-branch" href="/concepts/deployments">
    Stage, assess, publish, diagnose, and clean versioned deployments.
  </Card>

  <Card title="Orders demo" icon="cart-shopping" href="/examples/orders-demo">
    Run the checked-in Kafka and virtual-environment example.
  </Card>
</CardGroup>

## Core loop

```bash theme={null}
stb discover
stb compile
stb plan
stb build
stb test
stb audit
```

Run commands from anywhere inside a project, or pass `--project-dir` explicitly.

`stb build` already runs applicable audits. Use the separate `stb audit` command when you want to
rerun live checks later without rebuilding.
