# nadsyuhamus/databladez_tourism architecture

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

- Interactive diagram: https://gitdiagram.com/nadsyuhamus/databladez_tourism
- Repository: https://github.com/nadsyuhamus/databladez_tourism

## Overview

Databladez is a Malaysian tourism-intelligence dashboard for exploring tourism performance, digital-interest indicators, precomputed state and district signals, and planning guidance. Users move from a national overview to state exploration or AI insights, then can review confidence-aware recommendations and methodology. The frontend consumes packaged CSV/JSON results; documented analytics and ML are produced separately, and the browser does not run model inference. Edges reflect the supplied source excerpts and README; unsampled implementation details are not inferred.

Main entry points: [`app/page.tsx`](https://github.com/nadsyuhamus/databladez_tourism/blob/main/app/page.tsx) (National overview), [`app/ai-insights/page.tsx`](https://github.com/nadsyuhamus/databladez_tourism/blob/main/app/ai-insights/page.tsx) (AI insights page), [`app/recommendations/page.tsx`](https://github.com/nadsyuhamus/databladez_tourism/blob/main/app/recommendations/page.tsx) (Recommendations page), [`components/Sidebar.tsx`](https://github.com/nadsyuhamus/databladez_tourism/blob/main/components/Sidebar.tsx) (Navigation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pages["Dashboard pages"]
  node_overview["National overview<br/>[page.tsx]"]
  node_explore_page["Explore page<br/>[page.tsx]"]
  node_insights_page["AI insights page<br/>[page.tsx]"]
  node_recommendations_page["Recommendations page<br/>[page.tsx]"]
  node_methodology["Methodology page<br/>[page.tsx]"]
end

subgraph group_views["Interactive views"]
  node_sidebar["Navigation<br/>[Sidebar.tsx]"]
  node_kpi["KPI cards<br/>[KpiCard.tsx]"]
  node_trend_chart["Tourism trend"]
  node_state_chart["State comparison chart"]
  node_explore_view["State explorer"]
  node_scatter["Value scatter"]
  node_state_view["State intelligence"]
  node_district_view["District signals"]
  node_csv_export["CSV preview and export"]
end

subgraph group_data["Packaged data"]
  node_summary_data["Summary metrics"]
  node_comparison_data["State comparison data"]
  node_state_signals["State intelligence output"]
  node_district_signals["District signal output"]
end

subgraph group_guidance["Decision support"]
  node_recommendation_view["Planning guidance"]
end

node_visitor(("Dashboard user"))

node_visitor -.->|"opens dashboard"| node_overview
node_visitor -.->|"selects state view"| node_explore_page
node_visitor -.->|"opens insights"| node_insights_page
node_visitor -.->|"opens guidance"| node_recommendations_page
node_visitor -.->|"reviews methods"| node_methodology
node_overview -->|"renders navigation"| node_sidebar
node_explore_page -->|"renders navigation"| node_sidebar
node_insights_page -->|"renders navigation"| node_sidebar
node_recommendations_page -->|"renders navigation"| node_sidebar
node_methodology -->|"renders navigation"| node_sidebar
node_overview -->|"reads metrics"| node_summary_data
node_overview -->|"reads chart data"| node_comparison_data
node_overview -->|"renders cards"| node_kpi
node_overview -->|"renders trend"| node_trend_chart
node_overview -->|"renders comparison"| node_state_chart
node_explore_page -->|"reads and parses"| node_comparison_data
node_explore_page -->|"passes state data"| node_explore_view
node_explore_view -->|"renders scatter"| node_scatter
node_insights_page -->|"loads output"| node_state_signals
node_insights_page -->|"loads output"| node_district_signals
node_insights_page -->|"passes state signals"| node_state_view
node_insights_page -->|"passes district signals"| node_district_view
node_district_view -->|"passes filtered records"| node_csv_export
node_recommendations_page -->|"loads output"| node_state_signals
node_recommendations_page -->|"loads output"| node_district_signals
node_recommendations_page -->|"passes signal records"| node_recommendation_view

click node_overview "https://github.com/nadsyuhamus/databladez_tourism/blob/main/app/page.tsx"
click node_explore_page "https://github.com/nadsyuhamus/databladez_tourism/blob/main/app/explore/page.tsx"
click node_insights_page "https://github.com/nadsyuhamus/databladez_tourism/blob/main/app/ai-insights/page.tsx"
click node_recommendations_page "https://github.com/nadsyuhamus/databladez_tourism/blob/main/app/recommendations/page.tsx"
click node_methodology "https://github.com/nadsyuhamus/databladez_tourism/blob/main/app/methodology/page.tsx"
click node_sidebar "https://github.com/nadsyuhamus/databladez_tourism/blob/main/components/Sidebar.tsx"
click node_kpi "https://github.com/nadsyuhamus/databladez_tourism/blob/main/components/KpiCard.tsx"
click node_trend_chart "https://github.com/nadsyuhamus/databladez_tourism/blob/main/components/TourismTrendChart.tsx"
click node_state_chart "https://github.com/nadsyuhamus/databladez_tourism/blob/main/components/StateComparisonChart.tsx"
click node_explore_view "https://github.com/nadsyuhamus/databladez_tourism/blob/main/components/ExploreDashboard.tsx"
click node_scatter "https://github.com/nadsyuhamus/databladez_tourism/blob/main/components/StateValueScatter.tsx"
click node_state_view "https://github.com/nadsyuhamus/databladez_tourism/blob/main/components/StateIntelligenceDashboard.tsx"
click node_district_view "https://github.com/nadsyuhamus/databladez_tourism/blob/main/components/DistrictIntelligenceDashboard.tsx"
click node_csv_export "https://github.com/nadsyuhamus/databladez_tourism/blob/main/components/DistrictCsvDownloadButton.tsx"
click node_recommendation_view "https://github.com/nadsyuhamus/databladez_tourism/blob/main/components/RecommendationsDashboard.tsx"
click node_summary_data "https://github.com/nadsyuhamus/databladez_tourism/blob/main/datathon_final_package/summary_metrics.json"
click node_comparison_data "https://github.com/nadsyuhamus/databladez_tourism/blob/main/datathon_final_package/chart_data/state_comparison.csv"
click node_state_signals "https://github.com/nadsyuhamus/databladez_tourism/blob/main/ml/outputs/state_tourism_intelligence_latest.json"
click node_district_signals "https://github.com/nadsyuhamus/databladez_tourism/blob/main/ml/outputs/district_emerging_signals_latest.json"

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_overview,node_explore_page,node_insights_page,node_recommendations_page,node_methodology,node_visitor toneBlue
class node_sidebar,node_kpi,node_trend_chart,node_state_chart,node_explore_view,node_scatter,node_state_view,node_district_view,node_csv_export toneAmber
class node_summary_data,node_comparison_data,node_state_signals,node_district_signals toneMint
class node_recommendation_view toneRose
```

## Components

### Dashboard pages

- [National overview](https://github.com/nadsyuhamus/databladez_tourism/blob/main/app/page.tsx): `app/page.tsx`
- [Explore page](https://github.com/nadsyuhamus/databladez_tourism/blob/main/app/explore/page.tsx): `app/explore/page.tsx`
- [AI insights page](https://github.com/nadsyuhamus/databladez_tourism/blob/main/app/ai-insights/page.tsx): `app/ai-insights/page.tsx`
- [Recommendations page](https://github.com/nadsyuhamus/databladez_tourism/blob/main/app/recommendations/page.tsx): `app/recommendations/page.tsx`
- [Methodology page](https://github.com/nadsyuhamus/databladez_tourism/blob/main/app/methodology/page.tsx): `app/methodology/page.tsx`

### Interactive views

- [Navigation](https://github.com/nadsyuhamus/databladez_tourism/blob/main/components/Sidebar.tsx): `components/Sidebar.tsx`
- [KPI cards](https://github.com/nadsyuhamus/databladez_tourism/blob/main/components/KpiCard.tsx): `components/KpiCard.tsx`
- [Tourism trend](https://github.com/nadsyuhamus/databladez_tourism/blob/main/components/TourismTrendChart.tsx): `components/TourismTrendChart.tsx`
- [State comparison chart](https://github.com/nadsyuhamus/databladez_tourism/blob/main/components/StateComparisonChart.tsx): `components/StateComparisonChart.tsx`
- [State explorer](https://github.com/nadsyuhamus/databladez_tourism/blob/main/components/ExploreDashboard.tsx): `components/ExploreDashboard.tsx`
- [Value scatter](https://github.com/nadsyuhamus/databladez_tourism/blob/main/components/StateValueScatter.tsx): `components/StateValueScatter.tsx`
- [State intelligence](https://github.com/nadsyuhamus/databladez_tourism/blob/main/components/StateIntelligenceDashboard.tsx): `components/StateIntelligenceDashboard.tsx`
- [District signals](https://github.com/nadsyuhamus/databladez_tourism/blob/main/components/DistrictIntelligenceDashboard.tsx): `components/DistrictIntelligenceDashboard.tsx`
- [CSV preview and export](https://github.com/nadsyuhamus/databladez_tourism/blob/main/components/DistrictCsvDownloadButton.tsx): `components/DistrictCsvDownloadButton.tsx`

### Packaged data

- [Summary metrics](https://github.com/nadsyuhamus/databladez_tourism/blob/main/datathon_final_package/summary_metrics.json): `datathon_final_package/summary_metrics.json`
- [State comparison data](https://github.com/nadsyuhamus/databladez_tourism/blob/main/datathon_final_package/chart_data/state_comparison.csv): `datathon_final_package/chart_data/state_comparison.csv`
- [State intelligence output](https://github.com/nadsyuhamus/databladez_tourism/blob/main/ml/outputs/state_tourism_intelligence_latest.json): `ml/outputs/state_tourism_intelligence_latest.json`
- [District signal output](https://github.com/nadsyuhamus/databladez_tourism/blob/main/ml/outputs/district_emerging_signals_latest.json): `ml/outputs/district_emerging_signals_latest.json`

### Decision support

- [Planning guidance](https://github.com/nadsyuhamus/databladez_tourism/blob/main/components/RecommendationsDashboard.tsx): `components/RecommendationsDashboard.tsx`

### Other components

- **Dashboard user**

## Connections

- Dashboard user → National overview: opens dashboard
- Dashboard user → Explore page: selects state view
- Dashboard user → AI insights page: opens insights
- Dashboard user → Recommendations page: opens guidance
- Dashboard user → Methodology page: reviews methods
- National overview → Navigation: renders navigation (evidence: `app/page.tsx`)
- Explore page → Navigation: renders navigation (evidence: `app/explore/page.tsx`)
- AI insights page → Navigation: renders navigation (evidence: `app/ai-insights/page.tsx`)
- Recommendations page → Navigation: renders navigation (evidence: `app/recommendations/page.tsx`)
- Methodology page → Navigation: renders navigation (evidence: `app/methodology/page.tsx`)
- National overview → Summary metrics: reads metrics (evidence: `app/page.tsx`)
- National overview → State comparison data: reads chart data (evidence: `app/page.tsx`)
- National overview → KPI cards: renders cards (evidence: `app/page.tsx`)
- National overview → Tourism trend: renders trend (evidence: `app/page.tsx`)
- National overview → State comparison chart: renders comparison (evidence: `app/page.tsx`)
- Explore page → State comparison data: reads and parses (evidence: `app/explore/page.tsx`)
- Explore page → State explorer: passes state data (evidence: `app/explore/page.tsx`)
- State explorer → Value scatter: renders scatter (evidence: `components/ExploreDashboard.tsx`)
- AI insights page → State intelligence output: loads output (evidence: `app/ai-insights/page.tsx`)
- AI insights page → District signal output: loads output (evidence: `app/ai-insights/page.tsx`)
- AI insights page → State intelligence: passes state signals (evidence: `app/ai-insights/page.tsx`)
- AI insights page → District signals: passes district signals (evidence: `app/ai-insights/page.tsx`)
- District signals → CSV preview and export: passes filtered records (evidence: `components/DistrictIntelligenceDashboard.tsx`)
- Recommendations page → State intelligence output: loads output (evidence: `app/recommendations/page.tsx`)
- Recommendations page → District signal output: loads output (evidence: `app/recommendations/page.tsx`)
- Recommendations page → Planning guidance: passes signal records (evidence: `app/recommendations/page.tsx`)
