# dvkjain/sea-project-analyzer architecture

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

- Interactive diagram: https://gitdiagram.com/dvkjain/sea-project-analyzer
- Repository: https://github.com/dvkjain/sea-project-analyzer

## Overview

Sea Project Analyzer is a FastAPI web application for uploading tabular data and producing an exploratory analysis report. Its main workflow parses an upload, infers column types and computes statistics and correlations, stores the report, then serves dashboard and column-detail views; users can also export a PDF or change a column’s type. The README documents interactive charts, ID masking, and temporary storage cleanup. Connections involving unsampled templates and frontend behavior are limited to documented capabilities and visible route wiring.

Main entry points: [`main.py`](https://github.com/dvkjain/sea-project-analyzer/blob/main/main.py) (API routes), [`analyzer/analysis.py`](https://github.com/dvkjain/sea-project-analyzer/blob/main/analyzer/analysis.py) (Report builder), [`static/app.js`](https://github.com/dvkjain/sea-project-analyzer/blob/main/static/app.js) (Interactive UI), [`templates/results.html`](https://github.com/dvkjain/sea-project-analyzer/blob/main/templates/results.html) (Results dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["API routes<br/>[main.py]"]
  node_upload["Upload parsing<br/>[main.py]"]
end

subgraph group_analysis["Analysis engine"]
  node_type_inference["Type inference<br/>[helpers.py]"]
  node_report_builder["Report builder<br/>[analysis.py]"]
  node_stats["Typed statistics<br/>[stats_builders.py]"]
  node_analysis_utils["Plots and correlations<br/>[analysis_utils.py]"]
  node_column_detail["Column detail<br/>[analysis.py]"]
end

subgraph group_storage["Report storage"]
  node_report_store[("Report store<br/>[report_store.py]")]
end

subgraph group_presentation["Report presentation"]
  node_dashboard["Results dashboard<br/>[results.html]"]
  node_column_page["Column page<br/>[column_detail.html]"]
  node_upload_page["Upload page<br/>[index.html]"]
  node_browser["Interactive UI<br/>[app.js]"]
  node_pdf["PDF generator<br/>[pdf_generator.py]"]
end

node_user(("Analyst"))
node_plotly["Plotly.js"]

node_user -->|"submits data"| node_app
node_app -->|"routes upload"| node_upload
node_app -->|"renders"| node_upload_page
node_upload -->|"analyzes data"| node_report_builder
node_report_builder -->|"classifies columns"| node_type_inference
node_report_builder -->|"builds statistics"| node_stats
node_report_builder -->|"builds plots and correlations"| node_analysis_utils
node_app -->|"saves and fetches"| node_report_store
node_app -->|"renders results"| node_dashboard
node_app -->|"builds detail data"| node_column_detail
node_column_detail -->|"renders detail"| node_column_page
node_app -->|"generates export"| node_pdf
node_report_builder -->|"provides chart data"| node_browser
node_dashboard -.->|"hosts interactions"| node_browser
node_browser -->|"renders charts"| node_plotly
node_browser -->|"updates column type"| node_app
node_app -->|"recalculates statistics"| node_report_builder
node_stats -->|"uses shared helpers"| node_type_inference
node_user -->|"views report"| node_dashboard

click node_app "https://github.com/dvkjain/sea-project-analyzer/blob/main/main.py"
click node_upload "https://github.com/dvkjain/sea-project-analyzer/blob/main/main.py"
click node_type_inference "https://github.com/dvkjain/sea-project-analyzer/blob/main/analyzer/helpers.py"
click node_report_builder "https://github.com/dvkjain/sea-project-analyzer/blob/main/analyzer/analysis.py"
click node_stats "https://github.com/dvkjain/sea-project-analyzer/blob/main/analyzer/stats_builders.py"
click node_analysis_utils "https://github.com/dvkjain/sea-project-analyzer/blob/main/analyzer/analysis_utils.py"
click node_column_detail "https://github.com/dvkjain/sea-project-analyzer/blob/main/analyzer/analysis.py"
click node_report_store "https://github.com/dvkjain/sea-project-analyzer/blob/main/report_store.py"
click node_dashboard "https://github.com/dvkjain/sea-project-analyzer/blob/main/templates/results.html"
click node_column_page "https://github.com/dvkjain/sea-project-analyzer/blob/main/templates/column_detail.html"
click node_upload_page "https://github.com/dvkjain/sea-project-analyzer/blob/main/templates/index.html"
click node_browser "https://github.com/dvkjain/sea-project-analyzer/blob/main/static/app.js"
click node_pdf "https://github.com/dvkjain/sea-project-analyzer/blob/main/analyzer/pdf_generator.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_upload toneBlue
class node_type_inference,node_report_builder,node_stats,node_analysis_utils,node_column_detail toneAmber
class node_report_store toneMint
class node_dashboard,node_column_page,node_upload_page,node_browser,node_pdf toneRose
class node_user,node_plotly toneIndigo
```

## Components

### Web application

- [API routes](https://github.com/dvkjain/sea-project-analyzer/blob/main/main.py): `main.py`
- [Upload parsing](https://github.com/dvkjain/sea-project-analyzer/blob/main/main.py): `main.py`

### Analysis engine

- [Type inference](https://github.com/dvkjain/sea-project-analyzer/blob/main/analyzer/helpers.py): `analyzer/helpers.py`
- [Report builder](https://github.com/dvkjain/sea-project-analyzer/blob/main/analyzer/analysis.py): `analyzer/analysis.py`
- [Typed statistics](https://github.com/dvkjain/sea-project-analyzer/blob/main/analyzer/stats_builders.py): `analyzer/stats_builders.py`
- [Plots and correlations](https://github.com/dvkjain/sea-project-analyzer/blob/main/analyzer/analysis_utils.py): `analyzer/analysis_utils.py`
- [Column detail](https://github.com/dvkjain/sea-project-analyzer/blob/main/analyzer/analysis.py): `analyzer/analysis.py`

### Report storage

- [Report store](https://github.com/dvkjain/sea-project-analyzer/blob/main/report_store.py): `report_store.py`

### Report presentation

- [Results dashboard](https://github.com/dvkjain/sea-project-analyzer/blob/main/templates/results.html): `templates/results.html`
- [Column page](https://github.com/dvkjain/sea-project-analyzer/blob/main/templates/column_detail.html): `templates/column_detail.html`
- [Upload page](https://github.com/dvkjain/sea-project-analyzer/blob/main/templates/index.html): `templates/index.html`
- [Interactive UI](https://github.com/dvkjain/sea-project-analyzer/blob/main/static/app.js): `static/app.js`
- [PDF generator](https://github.com/dvkjain/sea-project-analyzer/blob/main/analyzer/pdf_generator.py): `analyzer/pdf_generator.py`

### Other components

- **Analyst**
- **Plotly.js**

## Connections

- Analyst → API routes: submits data (evidence: `README.md`)
- API routes → Upload parsing: routes upload (evidence: `main.py`)
- API routes → Upload page: renders (evidence: `main.py`)
- Upload parsing → Report builder: analyzes data (evidence: `main.py`)
- Report builder → Type inference: classifies columns (evidence: `analyzer/analysis.py`)
- Report builder → Typed statistics: builds statistics (evidence: `analyzer/analysis.py`)
- Report builder → Plots and correlations: builds plots and correlations (evidence: `analyzer/analysis.py`)
- API routes → Report store: saves and fetches (evidence: `main.py`)
- API routes → Results dashboard: renders results (evidence: `main.py`)
- API routes → Column detail: builds detail data (evidence: `main.py`)
- Column detail → Column page: renders detail
- API routes → PDF generator: generates export (evidence: `main.py`)
- Report builder → Interactive UI: provides chart data (evidence: `README.md`)
- Results dashboard → Interactive UI: hosts interactions
- Interactive UI → Plotly.js: renders charts (evidence: `README.md`)
- Interactive UI → API routes: updates column type (evidence: `static/app.js`)
- API routes → Report builder: recalculates statistics (evidence: `main.py`)
- Typed statistics → Type inference: uses shared helpers (evidence: `analyzer/stats_builders.py`)
- Analyst → Results dashboard: views report (evidence: `README.md`)
