# tufanbera/insightllm- architecture

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

- Interactive diagram: https://gitdiagram.com/tufanbera/insightllm-
- Repository: https://github.com/tufanbera/insightllm-

## Overview

InsightLLM is a Streamlit no-code analytics app: users upload CSV or Excel data, inspect an overview and visualizations, and request AI insights or answers in natural language. The app coordinates dataset loading and statistics, chart generation, and Gemini requests, then presents results. The README documents these capabilities; sampled source confirms the main module calls and Gemini integration, while some app lines are omitted, so uncertain UI wiring is not expanded.

Main entry points: [`app.py`](https://github.com/tufanbera/insightllm-/blob/main/app.py) (Streamlit App), [`utils/llm_handler.py`](https://github.com/tufanbera/insightllm-/blob/main/utils/llm_handler.py) (LLM Handler), [`utils/data_processor.py`](https://github.com/tufanbera/insightllm-/blob/main/utils/data_processor.py) (Data Processor), [`utils/visualizer.py`](https://github.com/tufanbera/insightllm-/blob/main/utils/visualizer.py) (Chart Generator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["User Application"]
  node_app["Streamlit App<br/>[app.py]"]
end

subgraph group_data["Dataset Analysis"]
  node_processor["Data Processor<br/>[data_processor.py]"]
  node_overview["Dataset Overview<br/>[data_processor.py]"]
  node_visualizer["Chart Generator<br/>[visualizer.py]"]
end

subgraph group_ai["AI Analysis"]
  node_llm["LLM Handler<br/>[llm_handler.py]"]
end

node_user(("Analyst"))
node_gemini{{"Google Gemini"}}

node_user -->|"uploads / asks"| node_app
node_app -->|"loads data"| node_processor
node_processor -->|"returns dataframe"| node_app
node_app -->|"requests statistics"| node_overview
node_app -->|"requests charts"| node_visualizer
node_app -->|"requests insights / answers"| node_llm
node_llm -->|"sends prompts"| node_gemini
node_gemini -->|"returns responses"| node_llm
node_app -->|"displays results"| node_user

click node_app "https://github.com/tufanbera/insightllm-/blob/main/app.py"
click node_processor "https://github.com/tufanbera/insightllm-/blob/main/utils/data_processor.py"
click node_overview "https://github.com/tufanbera/insightllm-/blob/main/utils/data_processor.py"
click node_visualizer "https://github.com/tufanbera/insightllm-/blob/main/utils/visualizer.py"
click node_llm "https://github.com/tufanbera/insightllm-/blob/main/utils/llm_handler.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 toneBlue
class node_processor,node_overview,node_visualizer toneAmber
class node_llm toneMint
class node_user,node_gemini toneIndigo
```

## Components

### User Application

- [Streamlit App](https://github.com/tufanbera/insightllm-/blob/main/app.py): `app.py`

### Dataset Analysis

- [Data Processor](https://github.com/tufanbera/insightllm-/blob/main/utils/data_processor.py): `utils/data_processor.py`
- [Dataset Overview](https://github.com/tufanbera/insightllm-/blob/main/utils/data_processor.py): `utils/data_processor.py`
- [Chart Generator](https://github.com/tufanbera/insightllm-/blob/main/utils/visualizer.py): `utils/visualizer.py`

### AI Analysis

- [LLM Handler](https://github.com/tufanbera/insightllm-/blob/main/utils/llm_handler.py): `utils/llm_handler.py`

### Other components

- **Analyst**
- **Google Gemini**

## Connections

- Analyst → Streamlit App: uploads / asks
- Streamlit App → Data Processor: loads data
- Data Processor → Streamlit App: returns dataframe
- Streamlit App → Dataset Overview: requests statistics
- Streamlit App → Chart Generator: requests charts
- Streamlit App → LLM Handler: requests insights / answers
- LLM Handler → Google Gemini: sends prompts
- Google Gemini → LLM Handler: returns responses
- Streamlit App → Analyst: displays results
