# captainmmd1304/user-funnel-and-drop-off-analysis architecture

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

- Interactive diagram: https://gitdiagram.com/captainmmd1304/user-funnel-and-drop-off-analysis
- Repository: https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis

## Overview

This repository analyzes user-journey funnel data through both a command-line report and an interactive Streamlit dashboard. The main workflow loads stage events, computes conversion and drop-off metrics, and presents results; additional analyses cover time to convert, churn timing, segment comparisons, and chi-squared tests. The README also describes synthetic data generation, but the referenced generator is absent from the supplied tree, so it is not represented as an implemented component.

Main entry points: [`analysis.py`](https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/analysis.py) (CLI Runner), [`dashboard.py`](https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/dashboard.py) (Streamlit App), [`user_funnel_data.csv`](https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/user_funnel_data.csv) (Journey CSV)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_input["Funnel Data"]
  node_csv["Journey CSV"]
end

subgraph group_cli["CLI Analysis"]
  node_cli_entry["CLI Runner<br/>[analysis.py]"]
  node_cli_loader["CSV Loader<br/>[analysis.py]"]
  node_funnel_metrics["Funnel Metrics<br/>[analysis.py]"]
  node_efficiency["Funnel Efficiency<br/>[analysis.py]"]
  node_timing["Conversion Timing<br/>[analysis.py]"]
  node_churn["Churn Analysis<br/>[analysis.py]"]
  node_segmentation["Segmented Funnels<br/>[analysis.py]"]
  node_ab_test["Chi-Squared Tests<br/>[analysis.py]"]
  node_cli_plots["CLI Charts<br/>[analysis.py]"]
end

subgraph group_dashboard["Interactive Dashboard"]
  node_web_app["Streamlit App<br/>[dashboard.py]"]
  node_web_loader["Cached CSV Loader<br/>[dashboard.py]"]
  node_filters["Device and Source Filters<br/>[dashboard.py]"]
  node_web_metrics["Dashboard Metrics<br/>[dashboard.py]"]
  node_funnel_views["Funnel Views<br/>[dashboard.py]"]
  node_web_ab["Interactive A/B Test<br/>[dashboard.py]"]
end

node_analyst(("Analyst"))

node_analyst -->|"runs"| node_cli_entry
node_cli_entry -->|"loads"| node_cli_loader
node_cli_loader -->|"reads"| node_csv
node_analyst -->|"opens"| node_web_app
node_web_app -->|"loads"| node_web_loader
node_web_loader -->|"reads"| node_csv
node_cli_entry -->|"calculates"| node_funnel_metrics
node_cli_entry -->|"calculates"| node_efficiency
node_cli_entry -->|"calculates"| node_timing
node_cli_entry -->|"analyzes"| node_churn
node_cli_entry -->|"plots"| node_segmentation
node_cli_entry -->|"tests"| node_ab_test
node_cli_entry -->|"plots"| node_cli_plots
node_web_app -->|"filters"| node_filters
node_filters -->|"calculates"| node_web_metrics
node_web_app -->|"renders"| node_funnel_views
node_web_app -->|"runs"| node_web_ab

click node_csv "https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/user_funnel_data.csv"
click node_cli_entry "https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/analysis.py"
click node_cli_loader "https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/analysis.py"
click node_funnel_metrics "https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/analysis.py"
click node_efficiency "https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/analysis.py"
click node_timing "https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/analysis.py"
click node_churn "https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/analysis.py"
click node_segmentation "https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/analysis.py"
click node_ab_test "https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/analysis.py"
click node_cli_plots "https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/analysis.py"
click node_web_app "https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/dashboard.py"
click node_web_loader "https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/dashboard.py"
click node_filters "https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/dashboard.py"
click node_web_metrics "https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/dashboard.py"
click node_funnel_views "https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/dashboard.py"
click node_web_ab "https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/dashboard.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_csv toneBlue
class node_cli_entry,node_cli_loader,node_funnel_metrics,node_efficiency,node_timing,node_churn,node_segmentation,node_ab_test,node_cli_plots toneAmber
class node_web_app,node_web_loader,node_filters,node_web_metrics,node_funnel_views,node_web_ab toneMint
class node_analyst toneIndigo
```

## Components

### Funnel Data

- [Journey CSV](https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/user_funnel_data.csv): `user_funnel_data.csv`

### CLI Analysis

- [CLI Runner](https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/analysis.py): `analysis.py`
- [CSV Loader](https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/analysis.py): `analysis.py`
- [Funnel Metrics](https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/analysis.py): `analysis.py`
- [Funnel Efficiency](https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/analysis.py): `analysis.py`
- [Conversion Timing](https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/analysis.py): `analysis.py`
- [Churn Analysis](https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/analysis.py): `analysis.py`
- [Segmented Funnels](https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/analysis.py): `analysis.py`
- [Chi-Squared Tests](https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/analysis.py): `analysis.py`
- [CLI Charts](https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/analysis.py): `analysis.py`

### Interactive Dashboard

- [Streamlit App](https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/dashboard.py): `dashboard.py`
- [Cached CSV Loader](https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/dashboard.py): `dashboard.py`
- [Device and Source Filters](https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/dashboard.py): `dashboard.py`
- [Dashboard Metrics](https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/dashboard.py): `dashboard.py`
- [Funnel Views](https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/dashboard.py): `dashboard.py`
- [Interactive A/B Test](https://github.com/captainmmd1304/user-funnel-and-drop-off-analysis/blob/master/dashboard.py): `dashboard.py`

### Other components

- **Analyst**

## Connections

- Analyst → CLI Runner: runs
- CLI Runner → CSV Loader: loads
- CSV Loader → Journey CSV: reads
- Analyst → Streamlit App: opens
- Streamlit App → Cached CSV Loader: loads
- Cached CSV Loader → Journey CSV: reads
- CLI Runner → Funnel Metrics: calculates
- CLI Runner → Funnel Efficiency: calculates
- CLI Runner → Conversion Timing: calculates
- CLI Runner → Churn Analysis: analyzes
- CLI Runner → Segmented Funnels: plots
- CLI Runner → Chi-Squared Tests: tests
- CLI Runner → CLI Charts: plots
- Streamlit App → Device and Source Filters: filters
- Device and Source Filters → Dashboard Metrics: calculates
- Streamlit App → Funnel Views: renders
- Streamlit App → Interactive A/B Test: runs
