# mohammadtarekkk/tidaline architecture

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

- Interactive diagram: https://gitdiagram.com/mohammadtarekkk/tidaline
- Repository: https://github.com/mohammadtarekkk/tidaline

## Overview

TidaLine is a maritime intelligence lakehouse: it collects vessel and port reference data in scheduled batches, streams seismic events into an OLTP store and through CDC, then transforms lakehouse data into port-risk and vessel analytics for querying and dashboards. Airflow coordinates the batch and transformation work; the seismic streaming job runs independently. The README documents the major flows and operational monitoring. Some infrastructure and transformation implementations were not sampled, so those nodes use supported configuration or directory paths, and relationships rely on documented architecture where noted.

Main entry points: [`dags/lakehouse_pipeline_dag.py`](https://github.com/mohammadtarekkk/tidaline/blob/main/dags/lakehouse_pipeline_dag.py) (Airflow Orchestration), [`dags/ingestion_dag.py`](https://github.com/mohammadtarekkk/tidaline/blob/main/dags/ingestion_dag.py) (Bronze Upload), [`infrastructure/debezium/debezium_postgres_source.json`](https://github.com/mohammadtarekkk/tidaline/blob/main/infrastructure/debezium/debezium_postgres_source.json) (Debezium Connector), [`jobs/batch/bronze_to_silver.py`](https://github.com/mohammadtarekkk/tidaline/blob/main/jobs/batch/bronze_to_silver.py) (Bronze Silver Job)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Data Ingestion"]
  node_vessel_scraper["Vessel Scraper<br/>[vessels.py]"]
  node_port_downloader["Port Downloader<br/>[ports.py]"]
  node_bronze_upload["Bronze Upload<br/>[ingestion_dag.py]"]
  node_bronze_store[("MinIO Bronze<br/>[docker-compose.yml]")]
end

subgraph group_cdc["Seismic CDC"]
  node_seismic_streamer["Earthquake Streamer<br/>[streamer.py]"]
  node_postgres_writer["Postgres Writer<br/>[writer.py]"]
  node_postgres[("Earthquakes Database")]
  node_debezium["Debezium Connector"]
  node_redpanda["Redpanda Topic<br/>[docker-compose.yml]"]
end

subgraph group_lakehouse["Lakehouse Processing"]
  node_stream_job["Seismic CDC Job"]
  node_batch_job["Bronze Silver Job"]
  node_iceberg_silver[("Iceberg Silver<br/>[docker-compose.yml]")]
end

subgraph group_analytics["Analytics Serving"]
  node_dbt_models["Gold Risk Models"]
  node_iceberg_gold[("Gold Analytics")]
  node_trino["Trino Query Engine<br/>[iceberg.properties]"]
  node_superset["Superset Dashboards"]
end

subgraph group_operations["Orchestration Monitoring"]
  node_airflow["Airflow Orchestration"]
  node_prometheus["Prometheus Metrics<br/>[prometheus.yml]"]
  node_grafana["Grafana Monitoring<br/>[datasources.yml]"]
end

node_operator(("Logistics Operator"))
node_vesselfinder(("VesselFinder"))
node_nga(("NGA Port Index"))
node_seismicportal(("SeismicPortal"))

node_vesselfinder -->|"provides vessel data"| node_vessel_scraper
node_nga -->|"provides port data"| node_port_downloader
node_seismicportal -->|"streams events"| node_seismic_streamer
node_vessel_scraper -->|"scrapes files for"| node_bronze_upload
node_port_downloader -->|"downloads files for"| node_bronze_upload
node_bronze_upload -->|"uploads CSVs"| node_bronze_store
node_seismic_streamer -->|"writes events via"| node_postgres_writer
node_postgres_writer -->|"upserts events"| node_postgres
node_postgres -->|"streams WAL changes"| node_debezium
node_debezium -->|"publishes changes"| node_redpanda
node_redpanda -->|"feeds event topic"| node_stream_job
node_stream_job -->|"merges earthquakes"| node_iceberg_silver
node_bronze_store -->|"reads CSVs"| node_batch_job
node_batch_job -->|"writes vessels and ports"| node_iceberg_silver
node_iceberg_silver -->|"transforms sources"| node_dbt_models
node_dbt_models -->|"builds risk analytics"| node_iceberg_gold
node_iceberg_gold -->|"queries tables"| node_trino
node_trino -->|"serves dashboards"| node_superset
node_operator -->|"explores analytics"| node_superset
node_airflow -->|"registers connector"| node_debezium
node_airflow -->|"submits batch job"| node_batch_job
node_airflow -->|"runs transformations"| node_dbt_models
node_prometheus -->|"feeds dashboards"| node_grafana

click node_vessel_scraper "https://github.com/mohammadtarekkk/tidaline/blob/main/extractors/batch/vessels.py"
click node_port_downloader "https://github.com/mohammadtarekkk/tidaline/blob/main/extractors/batch/ports.py"
click node_bronze_upload "https://github.com/mohammadtarekkk/tidaline/blob/main/dags/ingestion_dag.py"
click node_bronze_store "https://github.com/mohammadtarekkk/tidaline/blob/main/docker-compose.yml"
click node_seismic_streamer "https://github.com/mohammadtarekkk/tidaline/blob/main/extractors/stream/seismic/streamer.py"
click node_postgres_writer "https://github.com/mohammadtarekkk/tidaline/blob/main/extractors/stream/seismic/writer.py"
click node_postgres "https://github.com/mohammadtarekkk/tidaline/blob/main/infrastructure/postgres/init/create_earthquakes.sql"
click node_debezium "https://github.com/mohammadtarekkk/tidaline/blob/main/infrastructure/debezium/debezium_postgres_source.json"
click node_redpanda "https://github.com/mohammadtarekkk/tidaline/blob/main/docker-compose.yml"
click node_stream_job "https://github.com/mohammadtarekkk/tidaline/blob/main/jobs/streaming/seismic_cdc_to_iceberg.py"
click node_batch_job "https://github.com/mohammadtarekkk/tidaline/blob/main/jobs/batch/bronze_to_silver.py"
click node_iceberg_silver "https://github.com/mohammadtarekkk/tidaline/blob/main/docker-compose.yml"
click node_dbt_models "https://github.com/mohammadtarekkk/tidaline/tree/main/transform/models/gold"
click node_iceberg_gold "https://github.com/mohammadtarekkk/tidaline/tree/main/transform/models/gold"
click node_trino "https://github.com/mohammadtarekkk/tidaline/blob/main/infrastructure/trino/etc/catalog/iceberg.properties"
click node_superset "https://github.com/mohammadtarekkk/tidaline/blob/main/infrastructure/superset/Dockerfile"
click node_airflow "https://github.com/mohammadtarekkk/tidaline/blob/main/dags/lakehouse_pipeline_dag.py"
click node_prometheus "https://github.com/mohammadtarekkk/tidaline/blob/main/infrastructure/monitoring/prometheus.yml"
click node_grafana "https://github.com/mohammadtarekkk/tidaline/blob/main/infrastructure/grafana/provisioning/datasources/datasources.yml"

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_vessel_scraper,node_port_downloader,node_bronze_upload,node_bronze_store toneBlue
class node_seismic_streamer,node_postgres_writer,node_postgres,node_debezium,node_redpanda toneAmber
class node_stream_job,node_batch_job,node_iceberg_silver toneMint
class node_dbt_models,node_iceberg_gold,node_trino,node_superset toneRose
class node_airflow,node_prometheus,node_grafana,node_operator,node_vesselfinder,node_nga,node_seismicportal toneIndigo
```

## Components

### Data Ingestion

- [Vessel Scraper](https://github.com/mohammadtarekkk/tidaline/blob/main/extractors/batch/vessels.py): `extractors/batch/vessels.py`
- [Port Downloader](https://github.com/mohammadtarekkk/tidaline/blob/main/extractors/batch/ports.py): `extractors/batch/ports.py`
- [Bronze Upload](https://github.com/mohammadtarekkk/tidaline/blob/main/dags/ingestion_dag.py): `dags/ingestion_dag.py`
- [MinIO Bronze](https://github.com/mohammadtarekkk/tidaline/blob/main/docker-compose.yml): `docker-compose.yml`

### Seismic CDC

- [Earthquake Streamer](https://github.com/mohammadtarekkk/tidaline/blob/main/extractors/stream/seismic/streamer.py): `extractors/stream/seismic/streamer.py`
- [Postgres Writer](https://github.com/mohammadtarekkk/tidaline/blob/main/extractors/stream/seismic/writer.py): `extractors/stream/seismic/writer.py`
- [Earthquakes Database](https://github.com/mohammadtarekkk/tidaline/blob/main/infrastructure/postgres/init/create_earthquakes.sql): `infrastructure/postgres/init/create_earthquakes.sql`
- [Debezium Connector](https://github.com/mohammadtarekkk/tidaline/blob/main/infrastructure/debezium/debezium_postgres_source.json): `infrastructure/debezium/debezium_postgres_source.json`
- [Redpanda Topic](https://github.com/mohammadtarekkk/tidaline/blob/main/docker-compose.yml): `docker-compose.yml`

### Lakehouse Processing

- [Seismic CDC Job](https://github.com/mohammadtarekkk/tidaline/blob/main/jobs/streaming/seismic_cdc_to_iceberg.py): `jobs/streaming/seismic_cdc_to_iceberg.py`
- [Bronze Silver Job](https://github.com/mohammadtarekkk/tidaline/blob/main/jobs/batch/bronze_to_silver.py): `jobs/batch/bronze_to_silver.py`
- [Iceberg Silver](https://github.com/mohammadtarekkk/tidaline/blob/main/docker-compose.yml): `docker-compose.yml`

### Analytics Serving

- [Gold Risk Models](https://github.com/mohammadtarekkk/tidaline/tree/main/transform/models/gold): `transform/models/gold`
- [Gold Analytics](https://github.com/mohammadtarekkk/tidaline/tree/main/transform/models/gold): `transform/models/gold`
- [Trino Query Engine](https://github.com/mohammadtarekkk/tidaline/blob/main/infrastructure/trino/etc/catalog/iceberg.properties): `infrastructure/trino/etc/catalog/iceberg.properties`
- [Superset Dashboards](https://github.com/mohammadtarekkk/tidaline/blob/main/infrastructure/superset/Dockerfile): `infrastructure/superset/Dockerfile`

### Orchestration Monitoring

- [Airflow Orchestration](https://github.com/mohammadtarekkk/tidaline/blob/main/dags/lakehouse_pipeline_dag.py): `dags/lakehouse_pipeline_dag.py`
- [Prometheus Metrics](https://github.com/mohammadtarekkk/tidaline/blob/main/infrastructure/monitoring/prometheus.yml): `infrastructure/monitoring/prometheus.yml`
- [Grafana Monitoring](https://github.com/mohammadtarekkk/tidaline/blob/main/infrastructure/grafana/provisioning/datasources/datasources.yml): `infrastructure/grafana/provisioning/datasources/datasources.yml`

### Other components

- **Logistics Operator**
- **VesselFinder**
- **NGA Port Index**
- **SeismicPortal**

## Connections

- VesselFinder → Vessel Scraper: provides vessel data (evidence: `README.md`)
- NGA Port Index → Port Downloader: provides port data (evidence: `README.md`)
- SeismicPortal → Earthquake Streamer: streams events (evidence: `README.md`)
- Vessel Scraper → Bronze Upload: scrapes files for (evidence: `dags/ingestion_dag.py`)
- Port Downloader → Bronze Upload: downloads files for (evidence: `dags/ingestion_dag.py`)
- Bronze Upload → MinIO Bronze: uploads CSVs (evidence: `dags/ingestion_dag.py`)
- Earthquake Streamer → Postgres Writer: writes events via (evidence: `extractors/stream/seismic/streamer.py`)
- Postgres Writer → Earthquakes Database: upserts events (evidence: `extractors/stream/seismic/writer.py`)
- Earthquakes Database → Debezium Connector: streams WAL changes (evidence: `README.md`)
- Debezium Connector → Redpanda Topic: publishes changes (evidence: `README.md`)
- Redpanda Topic → Seismic CDC Job: feeds event topic (evidence: `jobs/streaming/seismic_cdc_to_iceberg.py`)
- Seismic CDC Job → Iceberg Silver: merges earthquakes (evidence: `jobs/streaming/seismic_cdc_to_iceberg.py`)
- MinIO Bronze → Bronze Silver Job: reads CSVs (evidence: `jobs/batch/bronze_to_silver.py`)
- Bronze Silver Job → Iceberg Silver: writes vessels and ports (evidence: `jobs/batch/bronze_to_silver.py`)
- Iceberg Silver → Gold Risk Models: transforms sources (evidence: `README.md`)
- Gold Risk Models → Gold Analytics: builds risk analytics (evidence: `README.md`)
- Gold Analytics → Trino Query Engine: queries tables (evidence: `README.md`)
- Trino Query Engine → Superset Dashboards: serves dashboards (evidence: `README.md`)
- Logistics Operator → Superset Dashboards: explores analytics (evidence: `README.md`)
- Airflow Orchestration → Debezium Connector: registers connector (evidence: `dags/lakehouse_pipeline_dag.py`)
- Airflow Orchestration → Bronze Silver Job: submits batch job (evidence: `dags/lakehouse_pipeline_dag.py`)
- Airflow Orchestration → Gold Risk Models: runs transformations (evidence: `dags/lakehouse_pipeline_dag.py`)
- Prometheus Metrics → Grafana Monitoring: feeds dashboards (evidence: `README.md`)
