# iam-veeramalla/kafka-zero-to-hero architecture

> Architecture diagram of the GitHub repository iam-veeramalla/kafka-zero-to-hero, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/iam-veeramalla/kafka-zero-to-hero
- Repository: https://github.com/iam-veeramalla/kafka-zero-to-hero

## Overview

Kafka Zero to Hero is a beginner tutorial with runnable Python demos and a Docker-based local Kafka setup. Its main workflow is to create a topic, publish JSON events, and consume them in near real time. The README documents these steps and the broker; the sampled shared module provides Kafka client, serialization, topic, and message-draining helpers. The example source files were not sampled, so their use of those helpers and the exact call paths cannot be confirmed.

Main entry points: [`examples/live_topic_setup.py`](https://github.com/iam-veeramalla/kafka-zero-to-hero/blob/main/examples/live_topic_setup.py) (Topic setup), [`examples/live_producer.py`](https://github.com/iam-veeramalla/kafka-zero-to-hero/blob/main/examples/live_producer.py) (Live producer), [`examples/live_consumer.py`](https://github.com/iam-veeramalla/kafka-zero-to-hero/blob/main/examples/live_consumer.py) (Live consumer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_demo["Live Kafka Demo"]
  node_topic_setup["Topic setup"]
  node_producer["Live producer<br/>[live_producer.py]"]
  node_consumer["Live consumer<br/>[live_consumer.py]"]
end

subgraph group_shared["Shared Helpers"]
  node_common["Kafka helpers<br/>[common.py]"]
end

subgraph group_platform["Kafka Platform"]
  node_broker[("Kafka broker")]
  node_topic["Event topic"]
end

node_user(("Demo operator"))

node_user -->|"runs setup"| node_topic_setup
node_user -->|"runs producer"| node_producer
node_user -->|"runs consumer"| node_consumer
node_topic_setup -->|"creates topic"| node_broker
node_producer -->|"publishes events"| node_topic
node_topic -->|"delivers events"| node_consumer
node_broker -->|"hosts topic"| node_topic

click node_topic_setup "https://github.com/iam-veeramalla/kafka-zero-to-hero/blob/main/examples/live_topic_setup.py"
click node_producer "https://github.com/iam-veeramalla/kafka-zero-to-hero/blob/main/examples/live_producer.py"
click node_consumer "https://github.com/iam-veeramalla/kafka-zero-to-hero/blob/main/examples/live_consumer.py"
click node_common "https://github.com/iam-veeramalla/kafka-zero-to-hero/blob/main/src/kafka_zero_to_hero/common.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_topic_setup,node_producer,node_consumer toneBlue
class node_common toneAmber
class node_broker,node_topic toneMint
class node_user toneIndigo
```

## Components

### Live Kafka Demo

- [Topic setup](https://github.com/iam-veeramalla/kafka-zero-to-hero/blob/main/examples/live_topic_setup.py): `examples/live_topic_setup.py`
- [Live producer](https://github.com/iam-veeramalla/kafka-zero-to-hero/blob/main/examples/live_producer.py): `examples/live_producer.py`
- [Live consumer](https://github.com/iam-veeramalla/kafka-zero-to-hero/blob/main/examples/live_consumer.py): `examples/live_consumer.py`

### Shared Helpers

- [Kafka helpers](https://github.com/iam-veeramalla/kafka-zero-to-hero/blob/main/src/kafka_zero_to_hero/common.py): `src/kafka_zero_to_hero/common.py`

### Kafka Platform

- **Kafka broker**
- **Event topic**

### Other components

- **Demo operator**

## Connections

- Demo operator → Topic setup: runs setup (evidence: `README.md`)
- Demo operator → Live producer: runs producer (evidence: `README.md`)
- Demo operator → Live consumer: runs consumer (evidence: `README.md`)
- Topic setup → Kafka broker: creates topic (evidence: `README.md`)
- Live producer → Event topic: publishes events (evidence: `README.md`)
- Event topic → Live consumer: delivers events (evidence: `README.md`)
- Kafka broker → Event topic: hosts topic (evidence: `README.md`)
