# abhi5633/travel-marketplace-product-analytics architecture

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

- Interactive diagram: https://gitdiagram.com/abhi5633/travel-marketplace-product-analytics
- Repository: https://github.com/abhi5633/travel-marketplace-product-analytics

## Overview

This is a synthetic travel-marketplace product analytics portfolio project. Its main workflow generates eight relational datasets, cleans and validates them, produces Python KPI/fact/cohort analyses, loads the clean tables into PostgreSQL for SQL analysis, and presents the results through Power BI materials and a Python preview. The graph preserves funnel, retention, supplier economics, and monthly KPI analysis. Some Power BI and SQL implementation details are documented but not sampled; those relationships are limited to README-supported claims.

Main entry points: [`src/verify_postgres.py`](https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/src/verify_postgres.py) (SQL reconciliation), [`src/pipeline.py`](https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/src/pipeline.py) (Pipeline CLI), [`outputs`](https://github.com/abhi5633/travel-marketplace-product-analytics/tree/main/outputs) (Analytics exports), [`src/load_postgres.py`](https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/src/load_postgres.py) (Postgres loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_python["Python analytics"]
  node_pipeline["Pipeline CLI<br/>[pipeline.py]"]
  node_generation["Data generation<br/>[pipeline.py]"]
  node_cleaning["Data cleaning<br/>[pipeline.py]"]
  node_validation["Data validation<br/>[pipeline.py]"]
  node_pythonreports["Python analytics<br/>[pipeline.py]"]
end

subgraph group_postgres["PostgreSQL analytics"]
  node_loader["Postgres loader<br/>[load_postgres.py]"]
  node_schema["Database schema<br/>[01_schema.sql]"]
  node_views["Analytic views<br/>[02_views.sql]"]
  node_funnel["Funnel analysis<br/>[03_funnel.sql]"]
  node_retention["Retention analysis<br/>[04_retention.sql]"]
  node_supplier["Supplier economics"]
  node_monthly["Monthly KPIs"]
  node_verify["SQL reconciliation<br/>[verify_postgres.py]"]
end

subgraph group_bi["Reporting outputs"]
  node_outputs["Analytics exports"]
  node_preview["Python preview<br/>[make_preview.py]"]
  node_powerbi["Power BI report"]
end

node_analyst(("Analyst"))

node_analyst -->|"runs"| node_pipeline
node_pipeline -->|"dispatches"| node_generation
node_pipeline -->|"dispatches"| node_cleaning
node_pipeline -->|"dispatches"| node_validation
node_pipeline -->|"dispatches"| node_pythonreports
node_pythonreports -->|"exports"| node_outputs
node_loader -->|"calls"| node_validation
node_loader -->|"executes"| node_schema
node_loader -->|"executes"| node_views
node_verify -->|"imports"| node_pipeline
node_verify -->|"executes"| node_funnel
node_verify -->|"executes"| node_retention
node_verify -->|"executes"| node_supplier
node_verify -->|"executes"| node_monthly
node_verify -->|"reconciles"| node_outputs
node_preview -->|"reads"| node_outputs
node_outputs -.->|"informs"| node_powerbi

click node_pipeline "https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/src/pipeline.py"
click node_generation "https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/src/pipeline.py"
click node_cleaning "https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/src/pipeline.py"
click node_validation "https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/src/pipeline.py"
click node_pythonreports "https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/src/pipeline.py"
click node_loader "https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/src/load_postgres.py"
click node_schema "https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/sql/01_schema.sql"
click node_views "https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/sql/02_views.sql"
click node_funnel "https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/sql/03_funnel.sql"
click node_retention "https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/sql/04_retention.sql"
click node_supplier "https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/sql/05_supplier_economics.sql"
click node_monthly "https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/sql/06_monthly_kpis.sql"
click node_verify "https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/src/verify_postgres.py"
click node_outputs "https://github.com/abhi5633/travel-marketplace-product-analytics/tree/main/outputs"
click node_preview "https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/src/make_preview.py"
click node_powerbi "https://github.com/abhi5633/travel-marketplace-product-analytics/tree/main/powerbi"

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_pipeline,node_generation,node_cleaning,node_validation,node_pythonreports toneBlue
class node_loader,node_schema,node_views,node_funnel,node_retention,node_supplier,node_monthly,node_verify toneAmber
class node_outputs,node_preview,node_powerbi toneMint
class node_analyst toneIndigo
```

## Components

### Python analytics

- [Pipeline CLI](https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/src/pipeline.py): `src/pipeline.py`
- [Data generation](https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/src/pipeline.py): `src/pipeline.py`
- [Data cleaning](https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/src/pipeline.py): `src/pipeline.py`
- [Data validation](https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/src/pipeline.py): `src/pipeline.py`
- [Python analytics](https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/src/pipeline.py): `src/pipeline.py`

### PostgreSQL analytics

- [Postgres loader](https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/src/load_postgres.py): `src/load_postgres.py`
- [Database schema](https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/sql/01_schema.sql): `sql/01_schema.sql`
- [Analytic views](https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/sql/02_views.sql): `sql/02_views.sql`
- [Funnel analysis](https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/sql/03_funnel.sql): `sql/03_funnel.sql`
- [Retention analysis](https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/sql/04_retention.sql): `sql/04_retention.sql`
- [Supplier economics](https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/sql/05_supplier_economics.sql): `sql/05_supplier_economics.sql`
- [Monthly KPIs](https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/sql/06_monthly_kpis.sql): `sql/06_monthly_kpis.sql`
- [SQL reconciliation](https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/src/verify_postgres.py): `src/verify_postgres.py`

### Reporting outputs

- [Analytics exports](https://github.com/abhi5633/travel-marketplace-product-analytics/tree/main/outputs): `outputs`
- [Python preview](https://github.com/abhi5633/travel-marketplace-product-analytics/blob/main/src/make_preview.py): `src/make_preview.py`
- [Power BI report](https://github.com/abhi5633/travel-marketplace-product-analytics/tree/main/powerbi): `powerbi`

### Other components

- **Analyst**

## Connections

- Analyst → Pipeline CLI: runs (evidence: `README.md`)
- Pipeline CLI → Data generation: dispatches (evidence: `src/pipeline.py`)
- Pipeline CLI → Data cleaning: dispatches (evidence: `src/pipeline.py`)
- Pipeline CLI → Data validation: dispatches (evidence: `src/pipeline.py`)
- Pipeline CLI → Python analytics: dispatches (evidence: `src/pipeline.py`)
- Python analytics → Analytics exports: exports (evidence: `README.md`)
- Postgres loader → Data validation: calls (evidence: `src/load_postgres.py`)
- Postgres loader → Database schema: executes (evidence: `src/load_postgres.py`)
- Postgres loader → Analytic views: executes (evidence: `src/load_postgres.py`)
- SQL reconciliation → Pipeline CLI: imports (evidence: `src/verify_postgres.py`)
- SQL reconciliation → Funnel analysis: executes (evidence: `src/verify_postgres.py`)
- SQL reconciliation → Retention analysis: executes (evidence: `src/verify_postgres.py`)
- SQL reconciliation → Supplier economics: executes (evidence: `src/verify_postgres.py`)
- SQL reconciliation → Monthly KPIs: executes (evidence: `src/verify_postgres.py`)
- SQL reconciliation → Analytics exports: reconciles (evidence: `src/verify_postgres.py`)
- Python preview → Analytics exports: reads (evidence: `src/make_preview.py`)
- Analytics exports → Power BI report: informs
