# tomtommao/summer-project-msc architecture

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

- Interactive diagram: https://gitdiagram.com/tomtommao/summer-project-msc
- Repository: https://github.com/tomtommao/summer-project-msc
- Video tour (about a minute): https://gitdiagram.com/tomtommao/summer-project-msc/video

## Overview

The repository is a transaction-analysis dashboard with a Python service. The main user workflow is to load transaction records, explore them across calendar, scatter/amount, cluster, and table views, and interact with selections and colour mappings. The source index shows a Python dataset and clustering backend, but the README provides no feature detail and the backend excerpts are unavailable; backend capabilities and its connection to the frontend are therefore represented conservatively.

Main entry points: [`frontend/app/dashboard/app.tsx`](https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/app.tsx) (Dashboard shell), [`frontend/app/dashboard/components/ClusterView/clusterViewSlice.ts`](https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/components/ClusterView/clusterViewSlice.ts) (Cluster view state), [`frontend/app/dashboard/components/Interactivity/interactivitySlice.tsx`](https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/components/Interactivity/interactivitySlice.tsx) (Interaction state), [`pythonServer/app/TransactionDataset.py`](https://github.com/tomtommao/summer-project-msc/blob/main/pythonServer/app/TransactionDataset.py) (Transaction dataset)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data and service"]
  node_transaction["Transaction model<br/>[DataObject.tsx]"]
  node_data_sync["Data synchronization"]
  node_transaction_hook["Transaction data hook"]
  node_api_config["Service configuration<br/>[consts.tsx]"]
  node_service["Python service<br/>[main.py]"]
  node_dataset["Transaction dataset"]
  node_preprocessor["String preprocessing"]
  node_cluster_engine["Clustering engine<br/>[Cluster.py]"]
  node_cluster_data["Cluster records"]
end

subgraph group_state["Dashboard state"]
  node_interaction_state["Interaction state"]
  node_cluster_state["Cluster view state"]
  node_colour_state["Colour settings"]
  node_cluster_hook["Cluster data hook<br/>[useClusterData.tsx]"]
  node_calendar_state["Calendar state"]
end

subgraph group_views["Analysis views"]
  node_dashboard["Dashboard shell<br/>[app.tsx]"]
  node_cluster_view["Cluster view<br/>[ClusterView.tsx]"]
  node_scatter_view["Interactive scatter"]
  node_amount_view["Amount analysis"]
  node_calendar_view["Calendar exploration<br/>[CalendarView3.tsx]"]
  node_day_charts["Day chart types"]
  node_table_view["Transaction tables<br/>[TableView.tsx]"]
end

subgraph group_support["Shared presentation"]
  node_colour_scales["Colour scales<br/>[useColourScales.ts]"]
  node_colour_legend["Colour legends<br/>[ColourLegends.tsx]"]
end

node_user(("Dashboard user"))

node_user -->|"uses"| node_dashboard
node_dashboard -->|"renders"| node_calendar_view
node_dashboard -->|"renders"| node_table_view
node_dashboard -.->|"synchronizes"| node_data_sync
node_dashboard -.->|"loads data"| node_transaction_hook
node_transaction_hook -->|"reads state"| node_interaction_state
node_data_sync -->|"uses records"| node_transaction
node_api_config -.->|"configures endpoint"| node_service
node_service -->|"uses dataset"| node_dataset
node_dataset -->|"uses"| node_preprocessor
node_dataset -->|"uses"| node_cluster_engine
node_cluster_state -->|"stores records"| node_cluster_data
node_cluster_hook -->|"selects data"| node_interaction_state
node_cluster_state -->|"imports hook"| node_cluster_hook
node_cluster_view -.->|"uses state"| node_cluster_state
node_cluster_view -->|"renders"| node_scatter_view
node_dashboard -.->|"renders"| node_amount_view
node_dashboard -.->|"renders"| node_cluster_view
node_calendar_view -->|"renders"| node_day_charts
node_calendar_view -->|"uses state"| node_calendar_state
node_scatter_view -->|"renders"| node_colour_legend
node_scatter_view -->|"uses scales"| node_colour_scales
node_colour_scales -->|"selects settings"| node_colour_state
node_table_view -->|"uses mappings"| node_colour_state
node_cluster_state -->|"selects transactions"| node_interaction_state
node_colour_state -->|"selects interactions"| node_interaction_state

click node_dashboard "https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/app.tsx"
click node_transaction "https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/utilities/DataObject.tsx"
click node_data_sync "https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/hooks/useSyncTransactionDataAndClusterData.tsx"
click node_transaction_hook "https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/hooks/useTransactionData.tsx"
click node_api_config "https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/utilities/consts.tsx"
click node_service "https://github.com/tomtommao/summer-project-msc/blob/main/pythonServer/app/main.py"
click node_dataset "https://github.com/tomtommao/summer-project-msc/blob/main/pythonServer/app/TransactionDataset.py"
click node_preprocessor "https://github.com/tomtommao/summer-project-msc/blob/main/pythonServer/app/stringPreprocessor.py"
click node_cluster_engine "https://github.com/tomtommao/summer-project-msc/blob/main/pythonServer/app/Cluster.py"
click node_interaction_state "https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/components/Interactivity/interactivitySlice.tsx"
click node_cluster_state "https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/components/ClusterView/clusterViewSlice.ts"
click node_colour_state "https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/components/ColourChannel/colourChannelSlice.ts"
click node_cluster_hook "https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/hooks/useClusterData.tsx"
click node_cluster_view "https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/components/ClusterView/ClusterView.tsx"
click node_scatter_view "https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/components/InteractiveScatterPlot/InteractiveScatterPlot.tsx"
click node_amount_view "https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/components/TransactionAmountView.tsx/TransactionAmountView.tsx"
click node_calendar_view "https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/components/CalendarView3/CalendarView3.tsx"
click node_day_charts "https://github.com/tomtommao/summer-project-msc/tree/main/frontend/app/dashboard/components/CalendarView3/DayViews"
click node_table_view "https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/components/TableView/TableView.tsx"
click node_colour_scales "https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/hooks/useColourScales.ts"
click node_colour_legend "https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/components/ColourLegend/ColourLegends.tsx"
click node_calendar_state "https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/components/CalendarView3/calendarViewSlice.ts"
click node_cluster_data "https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/utilities/clusterDataObject.tsx"

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_transaction,node_data_sync,node_transaction_hook,node_api_config,node_service,node_dataset,node_preprocessor,node_cluster_engine,node_cluster_data,node_user toneBlue
class node_interaction_state,node_cluster_state,node_colour_state,node_cluster_hook,node_calendar_state toneAmber
class node_dashboard,node_cluster_view,node_scatter_view,node_amount_view,node_calendar_view,node_day_charts,node_table_view toneMint
class node_colour_scales,node_colour_legend toneRose
```

## Components

### Data and service

- [Transaction model](https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/utilities/DataObject.tsx): `frontend/app/dashboard/utilities/DataObject.tsx`
- [Data synchronization](https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/hooks/useSyncTransactionDataAndClusterData.tsx): `frontend/app/dashboard/hooks/useSyncTransactionDataAndClusterData.tsx`
- [Transaction data hook](https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/hooks/useTransactionData.tsx): `frontend/app/dashboard/hooks/useTransactionData.tsx`
- [Service configuration](https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/utilities/consts.tsx): `frontend/app/dashboard/utilities/consts.tsx`
- [Python service](https://github.com/tomtommao/summer-project-msc/blob/main/pythonServer/app/main.py): `pythonServer/app/main.py`
- [Transaction dataset](https://github.com/tomtommao/summer-project-msc/blob/main/pythonServer/app/TransactionDataset.py): `pythonServer/app/TransactionDataset.py`
- [String preprocessing](https://github.com/tomtommao/summer-project-msc/blob/main/pythonServer/app/stringPreprocessor.py): `pythonServer/app/stringPreprocessor.py`
- [Clustering engine](https://github.com/tomtommao/summer-project-msc/blob/main/pythonServer/app/Cluster.py): `pythonServer/app/Cluster.py`
- [Cluster records](https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/utilities/clusterDataObject.tsx): `frontend/app/dashboard/utilities/clusterDataObject.tsx`

### Dashboard state

- [Interaction state](https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/components/Interactivity/interactivitySlice.tsx): `frontend/app/dashboard/components/Interactivity/interactivitySlice.tsx`
- [Cluster view state](https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/components/ClusterView/clusterViewSlice.ts): `frontend/app/dashboard/components/ClusterView/clusterViewSlice.ts`
- [Colour settings](https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/components/ColourChannel/colourChannelSlice.ts): `frontend/app/dashboard/components/ColourChannel/colourChannelSlice.ts`
- [Cluster data hook](https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/hooks/useClusterData.tsx): `frontend/app/dashboard/hooks/useClusterData.tsx`
- [Calendar state](https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/components/CalendarView3/calendarViewSlice.ts): `frontend/app/dashboard/components/CalendarView3/calendarViewSlice.ts`

### Analysis views

- [Dashboard shell](https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/app.tsx): `frontend/app/dashboard/app.tsx`
- [Cluster view](https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/components/ClusterView/ClusterView.tsx): `frontend/app/dashboard/components/ClusterView/ClusterView.tsx`
- [Interactive scatter](https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/components/InteractiveScatterPlot/InteractiveScatterPlot.tsx): `frontend/app/dashboard/components/InteractiveScatterPlot/InteractiveScatterPlot.tsx`
- [Amount analysis](https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/components/TransactionAmountView.tsx/TransactionAmountView.tsx): `frontend/app/dashboard/components/TransactionAmountView.tsx/TransactionAmountView.tsx`
- [Calendar exploration](https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/components/CalendarView3/CalendarView3.tsx): `frontend/app/dashboard/components/CalendarView3/CalendarView3.tsx`
- [Day chart types](https://github.com/tomtommao/summer-project-msc/tree/main/frontend/app/dashboard/components/CalendarView3/DayViews): `frontend/app/dashboard/components/CalendarView3/DayViews`
- [Transaction tables](https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/components/TableView/TableView.tsx): `frontend/app/dashboard/components/TableView/TableView.tsx`

### Shared presentation

- [Colour scales](https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/hooks/useColourScales.ts): `frontend/app/dashboard/hooks/useColourScales.ts`
- [Colour legends](https://github.com/tomtommao/summer-project-msc/blob/main/frontend/app/dashboard/components/ColourLegend/ColourLegends.tsx): `frontend/app/dashboard/components/ColourLegend/ColourLegends.tsx`

### Other components

- **Dashboard user**

## Connections

- Dashboard user → Dashboard shell: uses (evidence: `frontend/app/dashboard/app.tsx`)
- Dashboard shell → Calendar exploration: renders (evidence: `frontend/app/dashboard/app.tsx`)
- Dashboard shell → Transaction tables: renders (evidence: `frontend/app/dashboard/app.tsx`)
- Dashboard shell → Data synchronization: synchronizes (evidence: `frontend/app/dashboard/app.tsx`)
- Dashboard shell → Transaction data hook: loads data (evidence: `frontend/app/dashboard/app.tsx`)
- Transaction data hook → Interaction state: reads state (evidence: `frontend/app/dashboard/hooks/useTransactionData.tsx`)
- Data synchronization → Transaction model: uses records (evidence: `frontend/app/dashboard/hooks/useSyncTransactionDataAndClusterData.tsx`)
- Service configuration → Python service: configures endpoint (evidence: `frontend/app/dashboard/utilities/consts.tsx`)
- Python service → Transaction dataset: uses dataset (evidence: `pythonServer/app/main.py`)
- Transaction dataset → String preprocessing: uses (evidence: `pythonServer/app/TransactionDataset.py`)
- Transaction dataset → Clustering engine: uses (evidence: `pythonServer/app/TransactionDataset.py`)
- Cluster view state → Cluster records: stores records (evidence: `frontend/app/dashboard/components/ClusterView/clusterViewSlice.ts`)
- Cluster data hook → Interaction state: selects data (evidence: `frontend/app/dashboard/hooks/useClusterData.tsx`)
- Cluster view state → Cluster data hook: imports hook (evidence: `frontend/app/dashboard/components/ClusterView/clusterViewSlice.ts`)
- Cluster view → Cluster view state: uses state (evidence: `frontend/app/dashboard/components/ClusterView/ClusterView.tsx`)
- Cluster view → Interactive scatter: renders (evidence: `frontend/app/dashboard/components/InteractiveScatterPlot/InteractiveScatterPlot.tsx`)
- Dashboard shell → Amount analysis: renders (evidence: `frontend/app/dashboard/app.tsx`)
- Dashboard shell → Cluster view: renders (evidence: `frontend/app/dashboard/app.tsx`)
- Calendar exploration → Day chart types: renders (evidence: `frontend/app/dashboard/components/CalendarView3/CalendarView3.tsx`)
- Calendar exploration → Calendar state: uses state (evidence: `frontend/app/dashboard/components/CalendarView3/calendarViewSlice.ts`)
- Interactive scatter → Colour legends: renders (evidence: `frontend/app/dashboard/components/InteractiveScatterPlot/InteractiveScatterPlot.tsx`)
- Interactive scatter → Colour scales: uses scales (evidence: `frontend/app/dashboard/components/InteractiveScatterPlot/InteractiveScatterPlot.tsx`)
- Colour scales → Colour settings: selects settings (evidence: `frontend/app/dashboard/hooks/useColourScales.ts`)
- Transaction tables → Colour settings: uses mappings (evidence: `frontend/app/dashboard/components/TableView/TableView.tsx`)
- Cluster view state → Interaction state: selects transactions (evidence: `frontend/app/dashboard/components/ClusterView/clusterViewSlice.ts`)
- Colour settings → Interaction state: selects interactions (evidence: `frontend/app/dashboard/components/ColourChannel/colourChannelSlice.ts`)
