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

# Playground

> Start here: the whole product with its own broker, in one command, isolated on your machine — the workbench where a stream is designed and proved before it touches the shared cluster.

The playground is where to start, whether or not you have a cluster. It runs
**Alginte, a single-node Kafka (KRaft), and a Schema Registry together**,
seeded with sample topics, records, and a consumer group showing real lag, so
every screen has something to look at, and nothing is installed beyond the
containers. A Kafka Streams topology is deployed through Alginte's own API on
startup, so the Streams area opens on a live canvas with per-node numbers.

It is also the product's isolated mode. The stack is yours alone and leaves
nothing behind, so a stream can be designed, deployed and run wrong here at no
cost, then carried to the shared cluster as a file once it runs right. That
path is [From the playground to your cluster](https://docs.alginte.com/streams/promote.md).

```bash theme={null}
curl -O https://raw.githubusercontent.com/alginte/community/main/playground/docker-compose.yml
docker compose up -d
```

Then open [http://localhost:8888](http://localhost:8888).

### Overrides without editing the file

Every value you might want to change is a variable with its default in the compose file, so
nothing needs a `.env`:

| Variable | Default | What it sets |
| - | - | - |
| `ALGINTE_PORT` | `8888` | the port on `127.0.0.1` the console is published on |
| `ALGINTE_IMAGE` | `alginte/alginte:latest` | the console image; pin a release with it |
| `CONFLUENT_VERSION` | `8.2.0` | the Kafka broker and Schema Registry images |
| `CURL_VERSION` | `8.10.1` | the image that deploys the seeded topology |

```bash theme={null}
ALGINTE_PORT=8890 ALGINTE_IMAGE=alginte/alginte:0.12.0 docker compose up -d
```

The image variables are in the compose file from Alginte 0.13.0's playground; the port override
is older.

The playground runs in **sandbox mode**: its MCP endpoint at `/mcp` also offers the tools
that validate, deploy and reset stream designs, so an agent can work the builder here the
way a person does ([the stream tools](https://docs.alginte.com/operate/mcp.md#sandbox-mode-the-stream-tools)). Nothing
here is shared, and `docker compose down` undoes everything.

> [!NOTE]
>
> The playground binds the UI to `127.0.0.1` only and runs without login — it
> serves your machine and nothing else. There are no volumes:
> `docker compose down` **is** the reset button; `up -d` reseeds fresh.

## What's inside

| Seeded | Why |
| - | - |
| `orders` | Ten **real Avro records**, framed against the registered `orders-value` subject, with null keys — read them with a `Void` key and `Avro` value deserializer on the [Messages](https://docs.alginte.com/guides/messages.md) screen and expand one to its decoded JSON. |
| `orderEnrichment` stream | A **deployed, running topology**: `orders` → *order total* (mapValues) → *big orders* (filter, total > 50) → `orders-enriched` (JSON sink). Open a node's drawer to read its SpEL expression, watch a real record flow through the preview, and browse `orders-enriched` for what it produced. |
| `payments`, `customers` | Keyed JSON records to browse, filter, and decode. |
| `orders-auditor` consumer group | Left **Empty with real lag**, so the [offsets and lag columns](https://docs.alginte.com/guides/consumer-groups.md) show live numbers — and the offset-reset action is enabled (it requires an idle group). |
| `text-lines` → `word-counts` | Ingredients for the first topology you build yourself: follow the [Streams builder walkthrough](https://docs.alginte.com/streams/building.md) to build word-count on the canvas and watch `word-counts` fill up. |
| `demo-input`, `demo-output` | Empty topics for your own produce/consume experiments. |
| `severity` service | A **stand-in service** for the [Enrich from a service](https://docs.alginte.com/streams/enrich.md) node, from 0.14.0: it answers like a classifier, `{"answers":{"severity":{"choice":"high",…}}}`, the same request always getting the same answer, after 100 ms (`STUB_LATENCY_MS` to change it). Choose it on an Enrich node and the design deploys here; `orders-decided` is an empty topic for its output. |
| Schema Registry | Wired, with `orders-value` (Avro) registered — the subject the source node binds to, and the reason its serde section fills itself in. [Register your own subject](https://docs.alginte.com/guides/schema-registry.md) next to it. |

Kafka Connect and ksqlDB are not part of the playground — their menu areas hide
when unconfigured, which is the honest state.

## Bring your schemas and your data

The seeded topics prove the workbench; your own schemas and a sample of your records prove a
design. Two folders beside the compose file, created empty on the first `up`, are registered and
produced at every `docker compose up`, so they survive the reset:

| Folder | File | What happens |
| - | - | - |
| `schemas/` | `<subject>.avsc`, `<subject>.json`, `<subject>.proto` | registered under `<subject>` as Avro, JSON Schema or Protobuf |
| `records/` | `<topic>.avro.jsonl`, `<topic>.json-schema.jsonl`, `<topic>.protobuf.jsonl` | produced into `<topic>`, each value framed against the subject `<topic>-value` |
| `records/` | `<topic>.json.jsonl` | produced into `<topic>` as plain JSON, no registry |

One record per line, as the JSON the schema describes; `key|{...}` for a keyed record with a
String key, `{...}` for a null key. Topics are created with three partitions when missing.
A schema that references another subject needs the referenced one registered first; files
register in name order.

For a topic called `shipments` with JSON Schema values, that is two files:

```text theme={null}
schemas/shipments-value.json           the subject, saved out of your registry
records/shipments.json-schema.jsonl    s-1|{"shipmentId":"s-1","carrier":"DHL","weightKg":2.4}
```

The [playground folder](https://github.com/alginte/community/tree/main/playground) in the
community repository carries this pair and an Avro one under `schemas/examples/` and
`records/examples/` as templates; subfolders are skipped, so copy a pair up one level to try it.
A third template, `records/examples/shipments-cdc.json.jsonl`, is four real Debezium change
events (an insert, a second insert, an update and a delete) as plain JSON with no schema to copy:
it shows the envelope a connector writes without running a database or a connector.
Names the playground already seeds collide with the seed: a different schema under
`orders-value` is refused as incompatible, and records for `orders`, `payments`, `customers` or
`text-lines` land on top of the seeded ones. Your real names only collide if they are literally
these.

To copy a subject from your registry, save the `schema` field of
`GET /subjects/<subject>/versions/latest` as the file. To take a sample of a topic, consume it
with the registry-aware console consumer of the same format, which prints one JSON record per
line. Or register the schema and generate a sample from it on the Produce form: the right shape
with no personal data, at the cost of realistic values.

> [!NOTE]
>
> Keep a sample here, not a mirror. A small sample proves a design's logic if it is the right
> one: the ordinary record, and the ones that break things, a null where a field is optional, an
> empty list, a value on the boundary of your predicate. Production may not be able to give you
> those; here each is one more line in the file. Volume, partitioning under load and restore
> time are a matter for a real cluster. Anything personal in the sampled records is yours to
> redact before it lands in the folder.

Available from Alginte 0.13.0's playground compose; an older compose file has no such folders.

## From the playground to your cluster

The playground *is* the product — the same image, just pointed at a bundled
broker. A stream you design here travels to the real cluster as the JSON file
you download from the builder and upload on the Alginte that runs against
your cluster; the walkthrough, and what changes at the border, is
[From the playground to your cluster](https://docs.alginte.com/streams/promote.md). Running Alginte
against your own Kafka is the [Quick Start](https://docs.alginte.com/installation/quickstart.md).

## From the blog

* [A Kafka Streams topology starts in a sandbox, not on your
  cluster](https://www.alginte.com/blog/kafka-streams-topology-starts-in-a-sandbox/): why a
  design is worth proving on a stack of your own that you are free to break, against a sample of
  your records, before it goes near the cluster.
* [Debezium change events in Kafka Streams: flatten, route, and survive the
  delete](https://www.alginte.com/blog/debezium-change-events-kafka-streams/): the change-event
  envelope, worked through with the Debezium template above, and the expressions that flatten
  it, route it by operation, and keep a delete from failing the stream.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.