# pavankvnr85/data-plant architecture

> Architecture diagram of the GitHub repository pavankvnr85/data-plant, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pavankvnr85/data-plant
- Repository: https://github.com/pavankvnr85/data-plant

## Overview

Data Plant is a local-first lakehouse and operations-AI platform. Its main workflow seeds or receives batch data, ingests it to bronze, transforms it into silver and gold, and exposes batch and streaming results in a dashboard. Dagster can schedule the batch assets. Pipeline runs and table reads feed metadata and wastage analysis; a separate RAG path indexes project documentation and lets the ops chatbot answer questions using document retrieval and live metadata SQL. The graph includes documented but unsampled capabilities; those links are cited to the README rather than presented as inspected implementation details.

Main entry points: [`transform/run_dbt.py`](https://github.com/pavankvnr85/data-plant/blob/main/transform/run_dbt.py) (dbt Transform), [`ingestion/batch/autoloader_job.py`](https://github.com/pavankvnr85/data-plant/blob/main/ingestion/batch/autoloader_job.py) (Batch Ingestion), [`serving/dashboard.py`](https://github.com/pavankvnr85/data-plant/blob/main/serving/dashboard.py) (Analytics Dashboard), [`ai_rag/chatbot.py`](https://github.com/pavankvnr85/data-plant/blob/main/ai_rag/chatbot.py) (Ops Chatbot)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_batch["Batch Lakehouse"]
  node_seed["Seed Data<br/>[seed_data.py]"]
  node_batch_ingest["Batch Ingestion<br/>[autoloader_job.py]"]
  node_bronze[("Bronze Tables<br/>[autoloader_job.py]")]
  node_dbt["dbt Transform<br/>[run_dbt.py]"]
  node_silver_models["Silver Models"]
  node_gold_models["Gold Models"]
end

subgraph group_streaming["Streaming Analytics"]
  node_producer["Clickstream Producer"]
  node_kafka["Kafka / Redpanda"]
  node_stream_job["Window Aggregator"]
  node_stream_gold[("Streaming Gold")]
end

subgraph group_operations["Orchestration and Metadata"]
  node_dagster["Dagster Assets<br/>[assets.py]"]
  node_emitter["Run Metadata Emitter"]
  node_pipeline_runs[("Pipeline Runs<br/>[schema.sql]")]
  node_table_reads[("Table Read Log<br/>[table_reads.py]")]
  node_wastage["Wastage Detection<br/>[wastage_report.py]"]
  node_wastage_models["Wastage Models"]
end

subgraph group_serving["Analytics Serving"]
  node_dashboard["Analytics Dashboard<br/>[dashboard.py]"]
end

subgraph group_ai["RAG Operations Assistant"]
  node_doc_ingest["Document Embedding"]
  node_vector_store[("Vector Store<br/>[vector_store.py]")]
  node_ask["Document Q&amp;A<br/>[ask.py]"]
  node_chatbot["Ops Chatbot<br/>[chatbot.py]"]
end

node_operator(("Platform User"))
node_docs["Project Docs"]
node_ollama["Ollama Models"]
node_postgres[("Postgres / pgvector")]
node_aws_databricks["AWS / Databricks"]

node_operator -->|"generates inputs"| node_seed
node_operator -->|"runs ingestion"| node_batch_ingest
node_seed -->|"provides files"| node_batch_ingest
node_batch_ingest -->|"writes bronze"| node_bronze
node_bronze -->|"transforms inputs"| node_dbt
node_dbt -->|"builds staging"| node_silver_models
node_dbt -->|"builds marts"| node_gold_models
node_dagster -->|"invokes loads"| node_batch_ingest
node_dagster -->|"invokes transforms"| node_dbt
node_operator -->|"runs scheduled job"| node_dagster
node_operator -->|"starts stream"| node_producer
node_producer -->|"publishes events"| node_kafka
node_kafka -->|"consumes events"| node_stream_job
node_stream_job -->|"merges windows"| node_stream_gold
node_operator -->|"views analytics"| node_dashboard
node_dashboard -->|"reads batch gold"| node_gold_models
node_dashboard -->|"reads stream gold"| node_stream_gold
node_dashboard -->|"records reads"| node_table_reads
node_batch_ingest -->|"emits run status"| node_emitter
node_stream_job -->|"emits run status"| node_emitter
node_dbt -->|"emits run status"| node_emitter
node_emitter -->|"writes run records"| node_pipeline_runs
node_dbt -->|"records dependencies"| node_table_reads
node_pipeline_runs -->|"analyzes metadata"| node_wastage
node_table_reads -->|"informs usage checks"| node_wastage
node_wastage -->|"uses detection models"| node_wastage_models
node_operator -->|"indexes corpus"| node_doc_ingest
node_docs -->|"provides documents"| node_doc_ingest
node_doc_ingest -->|"requests embeddings"| node_ollama
node_doc_ingest -->|"upserts chunks"| node_vector_store
node_vector_store -->|"stores vectors"| node_postgres
node_operator -->|"asks ops questions"| node_chatbot
node_chatbot -->|"searches documents"| node_vector_store
node_chatbot -->|"queries live metrics"| node_pipeline_runs
node_chatbot -->|"requests answers"| node_ollama
node_operator -->|"asks document question"| node_ask
node_ask -->|"retrieves chunks"| node_vector_store
node_ask -->|"embeds and answers"| node_ollama
node_operator -.->|"configures cloud option"| node_aws_databricks

click node_seed "https://github.com/pavankvnr85/data-plant/blob/main/ingestion/batch/seed_data.py"
click node_batch_ingest "https://github.com/pavankvnr85/data-plant/blob/main/ingestion/batch/autoloader_job.py"
click node_bronze "https://github.com/pavankvnr85/data-plant/blob/main/ingestion/batch/autoloader_job.py"
click node_dbt "https://github.com/pavankvnr85/data-plant/blob/main/transform/run_dbt.py"
click node_silver_models "https://github.com/pavankvnr85/data-plant/tree/main/transform/dbt_project/models/staging"
click node_gold_models "https://github.com/pavankvnr85/data-plant/tree/main/transform/dbt_project/models/marts"
click node_dagster "https://github.com/pavankvnr85/data-plant/blob/main/orchestration/dagster_project/data_plant/assets.py"
click node_producer "https://github.com/pavankvnr85/data-plant/blob/main/ingestion/streaming/kafka_producer_clickstream.py"
click node_stream_job "https://github.com/pavankvnr85/data-plant/blob/main/ingestion/streaming/structured_streaming_job.py"
click node_stream_gold "https://github.com/pavankvnr85/data-plant/blob/main/ingestion/streaming/structured_streaming_job.py"
click node_dashboard "https://github.com/pavankvnr85/data-plant/blob/main/serving/dashboard.py"
click node_emitter "https://github.com/pavankvnr85/data-plant/blob/main/metadata/openlineage_emitter.py"
click node_pipeline_runs "https://github.com/pavankvnr85/data-plant/blob/main/metadata/schema.sql"
click node_table_reads "https://github.com/pavankvnr85/data-plant/blob/main/metadata/table_reads.py"
click node_wastage "https://github.com/pavankvnr85/data-plant/blob/main/metadata/wastage_report.py"
click node_wastage_models "https://github.com/pavankvnr85/data-plant/tree/main/metadata/wastage_models"
click node_doc_ingest "https://github.com/pavankvnr85/data-plant/blob/main/ai_rag/ingest_embeddings.py"
click node_vector_store "https://github.com/pavankvnr85/data-plant/blob/main/ai_rag/vector_store.py"
click node_ask "https://github.com/pavankvnr85/data-plant/blob/main/ai_rag/ask.py"
click node_chatbot "https://github.com/pavankvnr85/data-plant/blob/main/ai_rag/chatbot.py"
click node_docs "https://github.com/pavankvnr85/data-plant/tree/main/docs"

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_seed,node_batch_ingest,node_bronze,node_dbt,node_silver_models,node_gold_models,node_operator toneBlue
class node_producer,node_kafka,node_stream_job,node_stream_gold,node_postgres toneAmber
class node_dagster,node_emitter,node_pipeline_runs,node_table_reads,node_wastage,node_wastage_models toneMint
class node_dashboard toneRose
class node_doc_ingest,node_vector_store,node_ask,node_chatbot,node_ollama,node_aws_databricks toneIndigo
class node_docs toneTeal
```

## Components

### Batch Lakehouse

- [Seed Data](https://github.com/pavankvnr85/data-plant/blob/main/ingestion/batch/seed_data.py): `ingestion/batch/seed_data.py`
- [Batch Ingestion](https://github.com/pavankvnr85/data-plant/blob/main/ingestion/batch/autoloader_job.py): `ingestion/batch/autoloader_job.py`
- [Bronze Tables](https://github.com/pavankvnr85/data-plant/blob/main/ingestion/batch/autoloader_job.py): `ingestion/batch/autoloader_job.py`
- [dbt Transform](https://github.com/pavankvnr85/data-plant/blob/main/transform/run_dbt.py): `transform/run_dbt.py`
- [Silver Models](https://github.com/pavankvnr85/data-plant/tree/main/transform/dbt_project/models/staging): `transform/dbt_project/models/staging`
- [Gold Models](https://github.com/pavankvnr85/data-plant/tree/main/transform/dbt_project/models/marts): `transform/dbt_project/models/marts`

### Streaming Analytics

- [Clickstream Producer](https://github.com/pavankvnr85/data-plant/blob/main/ingestion/streaming/kafka_producer_clickstream.py): `ingestion/streaming/kafka_producer_clickstream.py`
- **Kafka / Redpanda**
- [Window Aggregator](https://github.com/pavankvnr85/data-plant/blob/main/ingestion/streaming/structured_streaming_job.py): `ingestion/streaming/structured_streaming_job.py`
- [Streaming Gold](https://github.com/pavankvnr85/data-plant/blob/main/ingestion/streaming/structured_streaming_job.py): `ingestion/streaming/structured_streaming_job.py`

### Orchestration and Metadata

- [Dagster Assets](https://github.com/pavankvnr85/data-plant/blob/main/orchestration/dagster_project/data_plant/assets.py): `orchestration/dagster_project/data_plant/assets.py`
- [Run Metadata Emitter](https://github.com/pavankvnr85/data-plant/blob/main/metadata/openlineage_emitter.py): `metadata/openlineage_emitter.py`
- [Pipeline Runs](https://github.com/pavankvnr85/data-plant/blob/main/metadata/schema.sql): `metadata/schema.sql`
- [Table Read Log](https://github.com/pavankvnr85/data-plant/blob/main/metadata/table_reads.py): `metadata/table_reads.py`
- [Wastage Detection](https://github.com/pavankvnr85/data-plant/blob/main/metadata/wastage_report.py): `metadata/wastage_report.py`
- [Wastage Models](https://github.com/pavankvnr85/data-plant/tree/main/metadata/wastage_models): `metadata/wastage_models`

### Analytics Serving

- [Analytics Dashboard](https://github.com/pavankvnr85/data-plant/blob/main/serving/dashboard.py): `serving/dashboard.py`

### RAG Operations Assistant

- [Document Embedding](https://github.com/pavankvnr85/data-plant/blob/main/ai_rag/ingest_embeddings.py): `ai_rag/ingest_embeddings.py`
- [Vector Store](https://github.com/pavankvnr85/data-plant/blob/main/ai_rag/vector_store.py): `ai_rag/vector_store.py`
- [Document Q&A](https://github.com/pavankvnr85/data-plant/blob/main/ai_rag/ask.py): `ai_rag/ask.py`
- [Ops Chatbot](https://github.com/pavankvnr85/data-plant/blob/main/ai_rag/chatbot.py): `ai_rag/chatbot.py`

### Other components

- **Platform User**
- [Project Docs](https://github.com/pavankvnr85/data-plant/tree/main/docs): `docs`
- **Ollama Models**
- **Postgres / pgvector**
- **AWS / Databricks**

## Connections

- Platform User → Seed Data: generates inputs (evidence: `ingestion/batch/seed_data.py`)
- Platform User → Batch Ingestion: runs ingestion (evidence: `README.md`)
- Seed Data → Batch Ingestion: provides files (evidence: `README.md`)
- Batch Ingestion → Bronze Tables: writes bronze (evidence: `ingestion/batch/autoloader_job.py`)
- Bronze Tables → dbt Transform: transforms inputs (evidence: `transform/run_dbt.py`)
- dbt Transform → Silver Models: builds staging
- dbt Transform → Gold Models: builds marts
- Dagster Assets → Batch Ingestion: invokes loads (evidence: `orchestration/dagster_project/data_plant/assets.py`)
- Dagster Assets → dbt Transform: invokes transforms (evidence: `orchestration/dagster_project/data_plant/assets.py`)
- Platform User → Dagster Assets: runs scheduled job (evidence: `README.md`)
- Platform User → Clickstream Producer: starts stream (evidence: `README.md`)
- Clickstream Producer → Kafka / Redpanda: publishes events (evidence: `README.md`)
- Kafka / Redpanda → Window Aggregator: consumes events (evidence: `ingestion/streaming/structured_streaming_job.py`)
- Window Aggregator → Streaming Gold: merges windows (evidence: `ingestion/streaming/structured_streaming_job.py`)
- Platform User → Analytics Dashboard: views analytics (evidence: `README.md`)
- Analytics Dashboard → Gold Models: reads batch gold (evidence: `serving/dashboard.py`)
- Analytics Dashboard → Streaming Gold: reads stream gold (evidence: `serving/dashboard.py`)
- Analytics Dashboard → Table Read Log: records reads (evidence: `serving/dashboard.py`)
- Batch Ingestion → Run Metadata Emitter: emits run status (evidence: `ingestion/batch/autoloader_job.py`)
- Window Aggregator → Run Metadata Emitter: emits run status (evidence: `ingestion/streaming/structured_streaming_job.py`)
- dbt Transform → Run Metadata Emitter: emits run status (evidence: `transform/run_dbt.py`)
- Run Metadata Emitter → Pipeline Runs: writes run records (evidence: `metadata/openlineage_emitter.py`)
- dbt Transform → Table Read Log: records dependencies (evidence: `metadata/table_reads.py`)
- Pipeline Runs → Wastage Detection: analyzes metadata (evidence: `README.md`)
- Table Read Log → Wastage Detection: informs usage checks (evidence: `metadata/table_reads.py`)
- Wastage Detection → Wastage Models: uses detection models (evidence: `README.md`)
- Platform User → Document Embedding: indexes corpus (evidence: `README.md`)
- Project Docs → Document Embedding: provides documents (evidence: `README.md`)
- Document Embedding → Ollama Models: requests embeddings (evidence: `ai_rag/ingest_embeddings.py`)
- Document Embedding → Vector Store: upserts chunks (evidence: `ai_rag/ingest_embeddings.py`)
- Vector Store → Postgres / pgvector: stores vectors (evidence: `ai_rag/vector_store.py`)
- Platform User → Ops Chatbot: asks ops questions (evidence: `README.md`)
- Ops Chatbot → Vector Store: searches documents (evidence: `ai_rag/chatbot.py`)
- Ops Chatbot → Pipeline Runs: queries live metrics (evidence: `README.md`)
- Ops Chatbot → Ollama Models: requests answers (evidence: `README.md`)
- Platform User → Document Q&A: asks document question (evidence: `ai_rag/ask.py`)
- Document Q&A → Vector Store: retrieves chunks (evidence: `ai_rag/ask.py`)
- Document Q&A → Ollama Models: embeds and answers (evidence: `ai_rag/ask.py`)
- Platform User → AWS / Databricks: configures cloud option (evidence: `README.md`)
