# amankumar5345/esko_hackathon architecture

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

- Interactive diagram: https://gitdiagram.com/amankumar5345/esko_hackathon
- Repository: https://github.com/amankumar5345/esko_hackathon

## Overview

Revision Brief is a Streamlit workspace that turns packaging artwork and a change-request email into a reviewed, exportable agency brief. Users submit both inputs; artwork and email extraction run in parallel, followed by alignment, deterministic regulatory ripple analysis, clarification, and row-by-row approval before export. The graph also includes workspace/session history and the major review views. Relationships reflect README statements and shown imports/routes; unsampled component internals are represented at their documented paths rather than inferred in detail.

Main entry points: [`app/streamlit_app.py`](https://github.com/amankumar5345/esko_hackathon/blob/main/app/streamlit_app.py) (Streamlit entry), [`src/graph/nodes.py`](https://github.com/amankumar5345/esko_hackathon/blob/main/src/graph/nodes.py) (Workflow stages), [`src/graph/workflow.py`](https://github.com/amankumar5345/esko_hackathon/blob/main/src/graph/workflow.py) (LangGraph workflow), [`app/components/intake.py`](https://github.com/amankumar5345/esko_hackathon/blob/main/app/components/intake.py) (Revision intake)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Workspace UI"]
  node_app["Streamlit entry<br/>[streamlit_app.py]"]
  node_intake["Revision intake<br/>[intake.py]"]
  node_dashboard["Overview dashboard<br/>[dashboard.py]"]
  node_artwork_ui["Artwork workspace<br/>[artwork_viewer.py]"]
  node_regulatory_ui["Regulatory findings"]
  node_qa_ui["Clarification review<br/>[qa_panel.py]"]
  node_protected_ui["Protected elements<br/>[locked_panel.py]"]
  node_history_ui["Session history<br/>[history.py]"]
  node_runner["Workflow runner<br/>[runner.py]"]
end

subgraph group_ingest["Input extraction"]
  node_artwork_parse["Artwork extraction<br/>[artwork_parser.py]"]
  node_cropper["Artwork crops<br/>[cropper.py]"]
  node_email_parse["Email intent extraction<br/>[email_parser.py]"]
end

subgraph group_analysis["Analysis workflow"]
  node_workflow["LangGraph workflow<br/>[workflow.py]"]
  node_graph_nodes["Workflow stages<br/>[nodes.py]"]
  node_aligner["Intent alignment<br/>[aligner.py]"]
  node_rules["CPG ripple rules<br/>[cpg_rules.py]"]
  node_catalog["Rule display catalog<br/>[rule_catalog.py]"]
end

subgraph group_review["Review and delivery"]
  node_brief_ui["Brief review<br/>[review_table.py]"]
  node_export_ui["Export center<br/>[export_center.py]"]
  node_clarification["Human clarification<br/>[nodes.py]"]
  node_brief_build["Brief synthesis<br/>[nodes.py]"]
  node_exporter["Brief exporters<br/>[brief_exporter.py]"]
end

subgraph group_state["Session state"]
  node_checkpoint[("Graph checkpoints<br/>[workflow.py]")]
  node_session_registry[("Session registry<br/>[sessions.py]")]
  node_session_context["Workspace context<br/>[context.py]"]
end

node_user(("Brand manager"))

node_user -->|"opens workspace"| node_app
node_app -->|"routes to"| node_intake
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_artwork_ui
node_app -->|"routes to"| node_regulatory_ui
node_app -->|"routes to"| node_qa_ui
node_app -->|"routes to"| node_brief_ui
node_app -->|"routes to"| node_protected_ui
node_app -->|"routes to"| node_export_ui
node_app -->|"routes to"| node_history_ui
node_intake -->|"queues run"| node_runner
node_runner -.->|"runs graph"| node_workflow
node_workflow -->|"dispatches stages"| node_graph_nodes
node_workflow -->|"checkpoints state"| node_checkpoint
node_graph_nodes -->|"extracts artwork"| node_artwork_parse
node_graph_nodes -->|"extracts intents"| node_email_parse
node_artwork_parse -->|"creates crops"| node_cropper
node_graph_nodes -->|"aligns intents"| node_aligner
node_graph_nodes -->|"runs ripple rules"| node_rules
node_graph_nodes -->|"interrupts for answers"| node_clarification
node_graph_nodes -->|"builds reviewed rows"| node_brief_build
node_graph_nodes -->|"generates exports"| node_exporter
node_artwork_ui -->|"shows rule metadata"| node_catalog
node_regulatory_ui -.->|"shows rule coverage"| node_catalog
node_brief_ui -->|"submits decisions"| node_graph_nodes
node_export_ui -.->|"downloads outputs"| node_exporter
node_intake -->|"registers session"| node_session_registry
node_session_context -->|"loads session data"| node_session_registry
node_session_context -->|"loads graph state"| node_workflow

click node_app "https://github.com/amankumar5345/esko_hackathon/blob/main/app/streamlit_app.py"
click node_intake "https://github.com/amankumar5345/esko_hackathon/blob/main/app/components/intake.py"
click node_dashboard "https://github.com/amankumar5345/esko_hackathon/blob/main/app/components/dashboard.py"
click node_artwork_ui "https://github.com/amankumar5345/esko_hackathon/blob/main/app/components/artwork_viewer.py"
click node_regulatory_ui "https://github.com/amankumar5345/esko_hackathon/blob/main/app/components/regulatory_panel.py"
click node_qa_ui "https://github.com/amankumar5345/esko_hackathon/blob/main/app/components/qa_panel.py"
click node_brief_ui "https://github.com/amankumar5345/esko_hackathon/blob/main/app/components/review_table.py"
click node_protected_ui "https://github.com/amankumar5345/esko_hackathon/blob/main/app/components/locked_panel.py"
click node_export_ui "https://github.com/amankumar5345/esko_hackathon/blob/main/app/components/export_center.py"
click node_history_ui "https://github.com/amankumar5345/esko_hackathon/blob/main/app/components/history.py"
click node_runner "https://github.com/amankumar5345/esko_hackathon/blob/main/app/ui/runner.py"
click node_workflow "https://github.com/amankumar5345/esko_hackathon/blob/main/src/graph/workflow.py"
click node_graph_nodes "https://github.com/amankumar5345/esko_hackathon/blob/main/src/graph/nodes.py"
click node_artwork_parse "https://github.com/amankumar5345/esko_hackathon/blob/main/src/ingestion/artwork_parser.py"
click node_cropper "https://github.com/amankumar5345/esko_hackathon/blob/main/src/ingestion/cropper.py"
click node_email_parse "https://github.com/amankumar5345/esko_hackathon/blob/main/src/ingestion/email_parser.py"
click node_aligner "https://github.com/amankumar5345/esko_hackathon/blob/main/src/engine/aligner.py"
click node_rules "https://github.com/amankumar5345/esko_hackathon/blob/main/src/engine/cpg_rules.py"
click node_catalog "https://github.com/amankumar5345/esko_hackathon/blob/main/src/engine/rule_catalog.py"
click node_clarification "https://github.com/amankumar5345/esko_hackathon/blob/main/src/graph/nodes.py"
click node_brief_build "https://github.com/amankumar5345/esko_hackathon/blob/main/src/graph/nodes.py"
click node_exporter "https://github.com/amankumar5345/esko_hackathon/blob/main/src/export/brief_exporter.py"
click node_checkpoint "https://github.com/amankumar5345/esko_hackathon/blob/main/src/graph/workflow.py"
click node_session_registry "https://github.com/amankumar5345/esko_hackathon/blob/main/src/sessions.py"
click node_session_context "https://github.com/amankumar5345/esko_hackathon/blob/main/app/ui/context.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_app,node_intake,node_dashboard,node_artwork_ui,node_regulatory_ui,node_qa_ui,node_protected_ui,node_history_ui,node_runner toneBlue
class node_artwork_parse,node_cropper,node_email_parse toneAmber
class node_workflow,node_graph_nodes,node_aligner,node_rules,node_catalog toneMint
class node_brief_ui,node_export_ui,node_clarification,node_brief_build,node_exporter toneRose
class node_checkpoint,node_session_registry,node_session_context,node_user toneIndigo
```

## Components

### Workspace UI

- [Streamlit entry](https://github.com/amankumar5345/esko_hackathon/blob/main/app/streamlit_app.py): `app/streamlit_app.py`
- [Revision intake](https://github.com/amankumar5345/esko_hackathon/blob/main/app/components/intake.py): `app/components/intake.py`
- [Overview dashboard](https://github.com/amankumar5345/esko_hackathon/blob/main/app/components/dashboard.py): `app/components/dashboard.py`
- [Artwork workspace](https://github.com/amankumar5345/esko_hackathon/blob/main/app/components/artwork_viewer.py): `app/components/artwork_viewer.py`
- [Regulatory findings](https://github.com/amankumar5345/esko_hackathon/blob/main/app/components/regulatory_panel.py): `app/components/regulatory_panel.py`
- [Clarification review](https://github.com/amankumar5345/esko_hackathon/blob/main/app/components/qa_panel.py): `app/components/qa_panel.py`
- [Protected elements](https://github.com/amankumar5345/esko_hackathon/blob/main/app/components/locked_panel.py): `app/components/locked_panel.py`
- [Session history](https://github.com/amankumar5345/esko_hackathon/blob/main/app/components/history.py): `app/components/history.py`
- [Workflow runner](https://github.com/amankumar5345/esko_hackathon/blob/main/app/ui/runner.py): `app/ui/runner.py`

### Input extraction

- [Artwork extraction](https://github.com/amankumar5345/esko_hackathon/blob/main/src/ingestion/artwork_parser.py): `src/ingestion/artwork_parser.py`
- [Artwork crops](https://github.com/amankumar5345/esko_hackathon/blob/main/src/ingestion/cropper.py): `src/ingestion/cropper.py`
- [Email intent extraction](https://github.com/amankumar5345/esko_hackathon/blob/main/src/ingestion/email_parser.py): `src/ingestion/email_parser.py`

### Analysis workflow

- [LangGraph workflow](https://github.com/amankumar5345/esko_hackathon/blob/main/src/graph/workflow.py): `src/graph/workflow.py`
- [Workflow stages](https://github.com/amankumar5345/esko_hackathon/blob/main/src/graph/nodes.py): `src/graph/nodes.py`
- [Intent alignment](https://github.com/amankumar5345/esko_hackathon/blob/main/src/engine/aligner.py): `src/engine/aligner.py`
- [CPG ripple rules](https://github.com/amankumar5345/esko_hackathon/blob/main/src/engine/cpg_rules.py): `src/engine/cpg_rules.py`
- [Rule display catalog](https://github.com/amankumar5345/esko_hackathon/blob/main/src/engine/rule_catalog.py): `src/engine/rule_catalog.py`

### Review and delivery

- [Brief review](https://github.com/amankumar5345/esko_hackathon/blob/main/app/components/review_table.py): `app/components/review_table.py`
- [Export center](https://github.com/amankumar5345/esko_hackathon/blob/main/app/components/export_center.py): `app/components/export_center.py`
- [Human clarification](https://github.com/amankumar5345/esko_hackathon/blob/main/src/graph/nodes.py): `src/graph/nodes.py`
- [Brief synthesis](https://github.com/amankumar5345/esko_hackathon/blob/main/src/graph/nodes.py): `src/graph/nodes.py`
- [Brief exporters](https://github.com/amankumar5345/esko_hackathon/blob/main/src/export/brief_exporter.py): `src/export/brief_exporter.py`

### Session state

- [Graph checkpoints](https://github.com/amankumar5345/esko_hackathon/blob/main/src/graph/workflow.py): `src/graph/workflow.py`
- [Session registry](https://github.com/amankumar5345/esko_hackathon/blob/main/src/sessions.py): `src/sessions.py`
- [Workspace context](https://github.com/amankumar5345/esko_hackathon/blob/main/app/ui/context.py): `app/ui/context.py`

### Other components

- **Brand manager**

## Connections

- Brand manager → Streamlit entry: opens workspace
- Streamlit entry → Revision intake: routes to (evidence: `app/streamlit_app.py`)
- Streamlit entry → Overview dashboard: routes to (evidence: `app/streamlit_app.py`)
- Streamlit entry → Artwork workspace: routes to (evidence: `app/streamlit_app.py`)
- Streamlit entry → Regulatory findings: routes to (evidence: `app/streamlit_app.py`)
- Streamlit entry → Clarification review: routes to (evidence: `app/streamlit_app.py`)
- Streamlit entry → Brief review: routes to (evidence: `app/streamlit_app.py`)
- Streamlit entry → Protected elements: routes to (evidence: `app/streamlit_app.py`)
- Streamlit entry → Export center: routes to (evidence: `app/streamlit_app.py`)
- Streamlit entry → Session history: routes to (evidence: `app/streamlit_app.py`)
- Revision intake → Workflow runner: queues run (evidence: `app/components/intake.py`)
- Workflow runner → LangGraph workflow: runs graph
- LangGraph workflow → Workflow stages: dispatches stages (evidence: `src/graph/workflow.py`)
- LangGraph workflow → Graph checkpoints: checkpoints state (evidence: `src/graph/workflow.py`)
- Workflow stages → Artwork extraction: extracts artwork (evidence: `src/graph/nodes.py`)
- Workflow stages → Email intent extraction: extracts intents (evidence: `src/graph/nodes.py`)
- Artwork extraction → Artwork crops: creates crops (evidence: `src/ingestion/artwork_parser.py`)
- Workflow stages → Intent alignment: aligns intents (evidence: `src/graph/nodes.py`)
- Workflow stages → CPG ripple rules: runs ripple rules (evidence: `src/graph/nodes.py`)
- Workflow stages → Human clarification: interrupts for answers (evidence: `src/graph/nodes.py`)
- Workflow stages → Brief synthesis: builds reviewed rows (evidence: `src/graph/nodes.py`)
- Workflow stages → Brief exporters: generates exports (evidence: `src/graph/nodes.py`)
- Artwork workspace → Rule display catalog: shows rule metadata (evidence: `app/components/artwork_viewer.py`)
- Regulatory findings → Rule display catalog: shows rule coverage
- Brief review → Workflow stages: submits decisions
- Export center → Brief exporters: downloads outputs
- Revision intake → Session registry: registers session (evidence: `app/components/intake.py`)
- Workspace context → Session registry: loads session data (evidence: `app/ui/context.py`)
- Workspace context → LangGraph workflow: loads graph state (evidence: `app/ui/context.py`)
