# nodero-group-project/ade-chat-assistant-frontend architecture

> Architecture diagram of the GitHub repository nodero-group-project/ade-chat-assistant-frontend, 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/nodero-group-project/ade-chat-assistant-frontend
- Repository: https://github.com/nodero-group-project/ade-chat-assistant-frontend

## Overview

Nodero is a React frontend for asking Aotearoa Data Explorer questions in natural language, with a separate admin path for managing datasets. Users enter through the landing page, open chat, and submit a question; the chat adapter requests a report from the backend and presents returned SDMX data and token usage. Admins can list, add, edit, and delete datasets through the backend. The backend’s internal processing is outside this repository, so the graph treats it as an external service.

Main entry points: [`src/components/RenderChat.tsx`](https://github.com/nodero-group-project/ade-chat-assistant-frontend/blob/main/src/components/RenderChat.tsx) (Chat interface), [`src/App.tsx`](https://github.com/nodero-group-project/ade-chat-assistant-frontend/blob/main/src/App.tsx) (App routes), [`src/components/Home.tsx`](https://github.com/nodero-group-project/ade-chat-assistant-frontend/blob/main/src/components/Home.tsx) (Role selection), [`src/components/Dataset.tsx`](https://github.com/nodero-group-project/ade-chat-assistant-frontend/blob/main/src/components/Dataset.tsx) (Dataset management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_app["App routes<br/>[App.tsx]"]
  node_landing["Role selection<br/>[Home.tsx]"]
end

subgraph group_question["Question and report flow"]
  node_chat["Chat interface<br/>[RenderChat.tsx]"]
  node_adapter["Report adapter<br/>[adapter.tsx]"]
end

subgraph group_results["Response presentation"]
  node_table["SDMX results table<br/>[MuiTable.tsx]"]
  node_usage["Token usage display<br/>[TokenUsage.tsx]"]
end

subgraph group_admin["Dataset administration"]
  node_dataset_admin["Dataset management<br/>[Dataset.tsx]"]
end

node_user(("User"))
node_report_api{{"ADE backend API"}}

node_user -->|"opens app"| node_app
node_app -->|"routes to"| node_landing
node_app -->|"routes to"| node_chat
node_app -->|"routes to"| node_dataset_admin
node_landing -->|"navigates to"| node_chat
node_landing -->|"navigates to"| node_dataset_admin
node_chat -->|"submits messages"| node_adapter
node_adapter -->|"requests reports"| node_report_api
node_chat -->|"renders SDMX data"| node_table
node_chat -->|"renders token data"| node_usage
node_dataset_admin -->|"manages datasets"| node_report_api

click node_app "https://github.com/nodero-group-project/ade-chat-assistant-frontend/blob/main/src/App.tsx"
click node_landing "https://github.com/nodero-group-project/ade-chat-assistant-frontend/blob/main/src/components/Home.tsx"
click node_chat "https://github.com/nodero-group-project/ade-chat-assistant-frontend/blob/main/src/components/RenderChat.tsx"
click node_adapter "https://github.com/nodero-group-project/ade-chat-assistant-frontend/blob/main/src/adapter.tsx"
click node_table "https://github.com/nodero-group-project/ade-chat-assistant-frontend/blob/main/src/components/MuiTable.tsx"
click node_usage "https://github.com/nodero-group-project/ade-chat-assistant-frontend/blob/main/src/components/TokenUsage.tsx"
click node_dataset_admin "https://github.com/nodero-group-project/ade-chat-assistant-frontend/blob/main/src/components/Dataset.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_app,node_landing,node_user toneBlue
class node_chat,node_adapter toneAmber
class node_table,node_usage,node_report_api toneMint
class node_dataset_admin toneRose
```

## Components

### App navigation

- [App routes](https://github.com/nodero-group-project/ade-chat-assistant-frontend/blob/main/src/App.tsx): `src/App.tsx`
- [Role selection](https://github.com/nodero-group-project/ade-chat-assistant-frontend/blob/main/src/components/Home.tsx): `src/components/Home.tsx`

### Question and report flow

- [Chat interface](https://github.com/nodero-group-project/ade-chat-assistant-frontend/blob/main/src/components/RenderChat.tsx): `src/components/RenderChat.tsx`
- [Report adapter](https://github.com/nodero-group-project/ade-chat-assistant-frontend/blob/main/src/adapter.tsx): `src/adapter.tsx`

### Response presentation

- [SDMX results table](https://github.com/nodero-group-project/ade-chat-assistant-frontend/blob/main/src/components/MuiTable.tsx): `src/components/MuiTable.tsx`
- [Token usage display](https://github.com/nodero-group-project/ade-chat-assistant-frontend/blob/main/src/components/TokenUsage.tsx): `src/components/TokenUsage.tsx`

### Dataset administration

- [Dataset management](https://github.com/nodero-group-project/ade-chat-assistant-frontend/blob/main/src/components/Dataset.tsx): `src/components/Dataset.tsx`

### Other components

- **User**
- **ADE backend API**

## Connections

- User → App routes: opens app (evidence: `README.md`)
- App routes → Role selection: routes to (evidence: `src/App.tsx`)
- App routes → Chat interface: routes to (evidence: `src/App.tsx`)
- App routes → Dataset management: routes to (evidence: `src/App.tsx`)
- Role selection → Chat interface: navigates to (evidence: `src/components/Home.tsx`)
- Role selection → Dataset management: navigates to (evidence: `src/components/Home.tsx`)
- Chat interface → Report adapter: submits messages (evidence: `src/components/RenderChat.tsx`)
- Report adapter → ADE backend API: requests reports (evidence: `src/adapter.tsx`)
- Chat interface → SDMX results table: renders SDMX data (evidence: `src/components/RenderChat.tsx`)
- Chat interface → Token usage display: renders token data (evidence: `src/components/RenderChat.tsx`)
- Dataset management → ADE backend API: manages datasets (evidence: `src/components/Dataset.tsx`)
