# hasanahmeds/capstone-ai-tableau-generator architecture

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

- Interactive diagram: https://gitdiagram.com/hasanahmeds/capstone-ai-tableau-generator
- Repository: https://github.com/hasanahmeds/capstone-ai-tableau-generator

## Overview

This repository builds Tableau dashboards from uploaded tabular data. The user uploads a CSV or Excel file, configures analysis options, runs a staged workflow, then reviews and downloads a generated workbook. The documented pipeline covers validation, profiling, analysis, recommendations, workbook generation, and finalization. The graph preserves those domain stages and the schema, prompt, and resilience layers. Source excerpts are partial, so some documented workflow transitions are shown from workflow.py; optional integrations are marked unverified where their wiring is not shown.

Main entry points: [`workflow.py`](https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/workflow.py) (Workflow orchestrator), [`dashboard_analyzer.py`](https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/dashboard_analyzer.py) (AI analysis), [`app.py`](https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/app.py) (Streamlit interface), [`tableau_workbook_generator.py`](https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/tableau_workbook_generator.py) (Tableau workbook generator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_app["Streamlit interface<br/>[app.py]"]
end

subgraph group_pipeline["Dashboard pipeline"]
  node_workflow["Workflow orchestrator<br/>[workflow.py]"]
  node_validation["Validate input<br/>[workflow.py]"]
  node_profiling["Profile dataset<br/>[workflow.py]"]
  node_processor["Data processing<br/>[data_processor.py]"]
  node_analysis_stage["Analyze dataset<br/>[workflow.py]"]
  node_recommend_stage["Recommend visuals<br/>[workflow.py]"]
  node_generation_stage["Generate workbook<br/>[workflow.py]"]
  node_finalize["Finalize output<br/>[workflow.py]"]
end

subgraph group_analysis["Analysis and recommendations"]
  node_analyzer["AI analysis"]
  node_prompts["Analysis prompts"]
  node_recommender["Visualization recommender"]
end

subgraph group_generation["Workbook generation"]
  node_generator["Tableau workbook generator"]
  node_workbook["TWB / TWBX output"]
end

subgraph group_support["Shared models and resilience"]
  node_schemas["Data and dashboard schemas<br/>[schemas.py]"]
  node_errors["Retries and fallbacks<br/>[error_handling.py]"]
end

node_user(("Dashboard user"))
node_llm(("LLM provider"))

node_user -->|"uploads and configures"| node_app
node_app -->|"runs workflow"| node_workflow
node_workflow -->|"starts with"| node_validation
node_validation -->|"then profiles"| node_profiling
node_profiling -->|"then analyzes"| node_analysis_stage
node_analysis_stage -->|"then recommends"| node_recommend_stage
node_recommend_stage -->|"then generates"| node_generation_stage
node_generation_stage -->|"then finalizes"| node_finalize
node_workflow -->|"uses processing"| node_processor
node_workflow -->|"runs analysis"| node_analyzer
node_workflow -->|"creates workbook"| node_generator
node_analyzer -->|"builds prompts"| node_prompts
node_analyzer -.->|"requests analysis"| node_llm
node_analyzer -->|"uses resilient calls"| node_errors
node_workflow -.->|"uses recommendations"| node_recommender
node_processor -->|"produces structured data"| node_schemas
node_recommender -->|"reads and returns specs"| node_schemas
node_generator -->|"consumes workbook specs"| node_schemas
node_generator -->|"exports"| node_workbook
node_finalize -.->|"returns results"| node_app
node_app -->|"shows downloads"| node_user

click node_app "https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/app.py"
click node_workflow "https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/workflow.py"
click node_validation "https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/workflow.py"
click node_profiling "https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/workflow.py"
click node_processor "https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/data_processor.py"
click node_analysis_stage "https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/workflow.py"
click node_analyzer "https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/dashboard_analyzer.py"
click node_prompts "https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/prompt_templates.py"
click node_recommend_stage "https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/workflow.py"
click node_recommender "https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/visualization_recommender.py"
click node_generation_stage "https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/workflow.py"
click node_generator "https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/tableau_workbook_generator.py"
click node_finalize "https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/workflow.py"
click node_schemas "https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/schemas.py"
click node_errors "https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/error_handling.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_user toneBlue
class node_workflow,node_validation,node_profiling,node_processor,node_analysis_stage,node_recommend_stage,node_generation_stage,node_finalize toneAmber
class node_analyzer,node_prompts,node_recommender toneMint
class node_generator,node_workbook toneRose
class node_schemas,node_errors,node_llm toneIndigo
```

## Components

### User experience

- [Streamlit interface](https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/app.py): `app.py`

### Dashboard pipeline

- [Workflow orchestrator](https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/workflow.py): `workflow.py`
- [Validate input](https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/workflow.py): `workflow.py`
- [Profile dataset](https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/workflow.py): `workflow.py`
- [Data processing](https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/data_processor.py): `data_processor.py`
- [Analyze dataset](https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/workflow.py): `workflow.py`
- [Recommend visuals](https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/workflow.py): `workflow.py`
- [Generate workbook](https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/workflow.py): `workflow.py`
- [Finalize output](https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/workflow.py): `workflow.py`

### Analysis and recommendations

- [AI analysis](https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/dashboard_analyzer.py): `dashboard_analyzer.py`
- [Analysis prompts](https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/prompt_templates.py): `prompt_templates.py`
- [Visualization recommender](https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/visualization_recommender.py): `visualization_recommender.py`

### Workbook generation

- [Tableau workbook generator](https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/tableau_workbook_generator.py): `tableau_workbook_generator.py`
- **TWB / TWBX output**

### Shared models and resilience

- [Data and dashboard schemas](https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/schemas.py): `schemas.py`
- [Retries and fallbacks](https://github.com/hasanahmeds/capstone-ai-tableau-generator/blob/main/error_handling.py): `error_handling.py`

### Other components

- **Dashboard user**
- **LLM provider**

## Connections

- Dashboard user → Streamlit interface: uploads and configures (evidence: `app.py`)
- Streamlit interface → Workflow orchestrator: runs workflow (evidence: `app.py`)
- Workflow orchestrator → Validate input: starts with (evidence: `workflow.py`)
- Validate input → Profile dataset: then profiles (evidence: `workflow.py`)
- Profile dataset → Analyze dataset: then analyzes (evidence: `workflow.py`)
- Analyze dataset → Recommend visuals: then recommends (evidence: `workflow.py`)
- Recommend visuals → Generate workbook: then generates (evidence: `workflow.py`)
- Generate workbook → Finalize output: then finalizes (evidence: `workflow.py`)
- Workflow orchestrator → Data processing: uses processing (evidence: `workflow.py`)
- Workflow orchestrator → AI analysis: runs analysis (evidence: `workflow.py`)
- Workflow orchestrator → Tableau workbook generator: creates workbook (evidence: `workflow.py`)
- AI analysis → Analysis prompts: builds prompts (evidence: `dashboard_analyzer.py`)
- AI analysis → LLM provider: requests analysis
- AI analysis → Retries and fallbacks: uses resilient calls (evidence: `dashboard_analyzer.py`)
- Workflow orchestrator → Visualization recommender: uses recommendations
- Data processing → Data and dashboard schemas: produces structured data (evidence: `data_processor.py`)
- Visualization recommender → Data and dashboard schemas: reads and returns specs (evidence: `visualization_recommender.py`)
- Tableau workbook generator → Data and dashboard schemas: consumes workbook specs (evidence: `tableau_workbook_generator.py`)
- Tableau workbook generator → TWB / TWBX output: exports
- Finalize output → Streamlit interface: returns results (evidence: `app.py`)
- Streamlit interface → Dashboard user: shows downloads (evidence: `app.py`)
