# mf-rayo/white-cat architecture

> Architecture diagram of the GitHub repository mf-rayo/white-cat, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mf-rayo/white-cat
- Repository: https://github.com/mf-rayo/white-cat

## Overview

White and Dark Cat is an experimental React threat-intelligence dashboard frontend. Users navigate from the dashboard to IOC, active-group, and CVE views; those views display summaries and report details fetched from the associated backend. The graph also preserves the documented API/feeds and asynchronous-backend context, but this repository contains only the frontend. Connections for unsampled pages are based on the SOURCE INDEX; the backend integration is documented but its implementation is outside this tree.

Main entry points: [`src/pages/Dashboard.jsx`](https://github.com/mf-rayo/white-cat/blob/main/src/pages/Dashboard.jsx) (Dashboard), [`src/App.jsx`](https://github.com/mf-rayo/white-cat/blob/main/src/App.jsx) (Router and layout), [`src/pages/ReportedCve.jsx`](https://github.com/mf-rayo/white-cat/blob/main/src/pages/ReportedCve.jsx) (Reported CVEs), [`src/pages/ActiveGroups.jsx`](https://github.com/mf-rayo/white-cat/blob/main/src/pages/ActiveGroups.jsx) (Active groups)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_app["Router and layout<br/>[App.jsx]"]
end

subgraph group_data["Data access"]
  node_fetcher["Cached fetch resource<br/>[fetchData.js]"]
  node_endpoints["API endpoints<br/>[api.js]"]
  node_dashboardstate["Dashboard data context"]
end

subgraph group_views["Threat views"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_ioc["Reported IOCs<br/>[Ioc.jsx]"]
  node_groups["Active groups<br/>[ActiveGroups.jsx]"]
  node_cves["Reported CVEs<br/>[ReportedCve.jsx]"]
  node_disclaimer["Disclaimer<br/>[Disclaimer.jsx]"]
end

subgraph group_ui["Shared presentation"]
  node_container["Page container<br/>[Container.jsx]"]
  node_posts["Post table<br/>[Posts.jsx]"]
  node_sources["Source table<br/>[Source.jsx]"]
  node_map["Dashboard map<br/>[SimpleMap.jsx]"]
  node_mapview["Map rendering<br/>[Map.jsx]"]
  node_iocdetails["IOC details<br/>[screenshot.jsx]"]
  node_cvss["CVSS details<br/>[cvss.jsx]"]
  node_date["Date formatting<br/>[FormatDate.jsx]"]
  node_badge["Badges<br/>[Badge.jsx]"]
  node_colors["Color mapping<br/>[hashColor.js]"]
  node_clipboard["Copy data<br/>[CopyData.jsx]"]
  node_alerts["Alert context<br/>[AlertContext.jsx]"]
  node_boundary["Error boundary<br/>[ErrorBoundary.jsx]"]
end

node_user(("User"))
node_backend["FastAPI backend"]

node_user -->|"navigates"| node_app
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_ioc
node_app -->|"routes to"| node_groups
node_app -->|"routes to"| node_cves
node_app -->|"routes to"| node_disclaimer
node_dashboard -->|"reads summary"| node_dashboardstate
node_dashboardstate -->|"loads data"| node_fetcher
node_dashboardstate -->|"uses endpoint"| node_endpoints
node_groups -->|"loads data"| node_fetcher
node_groups -->|"uses endpoint"| node_endpoints
node_ioc -->|"loads data"| node_fetcher
node_ioc -->|"uses endpoint"| node_endpoints
node_cves -->|"loads data"| node_fetcher
node_cves -->|"uses endpoint"| node_endpoints
node_fetcher -.->|"requests data"| node_backend
node_dashboard -->|"renders"| node_container
node_groups -->|"renders"| node_container
node_dashboard -->|"renders"| node_posts
node_groups -->|"renders"| node_posts
node_dashboard -->|"renders"| node_sources
node_dashboard -->|"renders"| node_map
node_map -->|"renders"| node_mapview
node_ioc -->|"renders"| node_iocdetails
node_cves -->|"renders"| node_cvss
node_dashboard -->|"formats dates"| node_date
node_cves -->|"formats dates"| node_date
node_iocdetails -->|"formats dates"| node_date
node_posts -->|"uses"| node_badge
node_posts -->|"colors labels"| node_colors
node_iocdetails -->|"copies value"| node_clipboard
node_cves -->|"uses"| node_badge
node_boundary -->|"reports errors"| node_alerts

click node_app "https://github.com/mf-rayo/white-cat/blob/main/src/App.jsx"
click node_dashboard "https://github.com/mf-rayo/white-cat/blob/main/src/pages/Dashboard.jsx"
click node_ioc "https://github.com/mf-rayo/white-cat/blob/main/src/pages/Ioc.jsx"
click node_groups "https://github.com/mf-rayo/white-cat/blob/main/src/pages/ActiveGroups.jsx"
click node_cves "https://github.com/mf-rayo/white-cat/blob/main/src/pages/ReportedCve.jsx"
click node_disclaimer "https://github.com/mf-rayo/white-cat/blob/main/src/pages/Disclaimer.jsx"
click node_fetcher "https://github.com/mf-rayo/white-cat/blob/main/src/lib/fetchData.js"
click node_endpoints "https://github.com/mf-rayo/white-cat/blob/main/src/lib/api.js"
click node_dashboardstate "https://github.com/mf-rayo/white-cat/blob/main/src/context/DashboardContext.jsx"
click node_container "https://github.com/mf-rayo/white-cat/blob/main/src/components/Container.jsx"
click node_posts "https://github.com/mf-rayo/white-cat/blob/main/src/components/ui/table/Posts.jsx"
click node_sources "https://github.com/mf-rayo/white-cat/blob/main/src/components/ui/table/Source.jsx"
click node_map "https://github.com/mf-rayo/white-cat/blob/main/src/components/ui/map/SimpleMap.jsx"
click node_mapview "https://github.com/mf-rayo/white-cat/blob/main/src/components/ui/map/Map.jsx"
click node_iocdetails "https://github.com/mf-rayo/white-cat/blob/main/src/components/ui/details/screenshot.jsx"
click node_cvss "https://github.com/mf-rayo/white-cat/blob/main/src/components/ui/details/cvss.jsx"
click node_date "https://github.com/mf-rayo/white-cat/blob/main/src/components/ui/date/FormatDate.jsx"
click node_badge "https://github.com/mf-rayo/white-cat/blob/main/src/components/ui/badge/Badge.jsx"
click node_colors "https://github.com/mf-rayo/white-cat/blob/main/src/lib/hashColor.js"
click node_clipboard "https://github.com/mf-rayo/white-cat/blob/main/src/components/ui/clipboard/CopyData.jsx"
click node_alerts "https://github.com/mf-rayo/white-cat/blob/main/src/context/AlertContext.jsx"
click node_boundary "https://github.com/mf-rayo/white-cat/blob/main/src/hooks/ErrorBoundary.jsx"

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_user toneBlue
class node_fetcher,node_endpoints,node_dashboardstate toneAmber
class node_dashboard,node_ioc,node_groups,node_cves,node_disclaimer,node_backend toneMint
class node_container,node_posts,node_sources,node_map,node_mapview,node_iocdetails,node_cvss,node_date,node_badge,node_colors,node_clipboard,node_alerts,node_boundary toneRose
```

## Components

### App navigation

- [Router and layout](https://github.com/mf-rayo/white-cat/blob/main/src/App.jsx): `src/App.jsx`

### Data access

- [Cached fetch resource](https://github.com/mf-rayo/white-cat/blob/main/src/lib/fetchData.js): `src/lib/fetchData.js`
- [API endpoints](https://github.com/mf-rayo/white-cat/blob/main/src/lib/api.js): `src/lib/api.js`
- [Dashboard data context](https://github.com/mf-rayo/white-cat/blob/main/src/context/DashboardContext.jsx): `src/context/DashboardContext.jsx`

### Threat views

- [Dashboard](https://github.com/mf-rayo/white-cat/blob/main/src/pages/Dashboard.jsx): `src/pages/Dashboard.jsx`
- [Reported IOCs](https://github.com/mf-rayo/white-cat/blob/main/src/pages/Ioc.jsx): `src/pages/Ioc.jsx`
- [Active groups](https://github.com/mf-rayo/white-cat/blob/main/src/pages/ActiveGroups.jsx): `src/pages/ActiveGroups.jsx`
- [Reported CVEs](https://github.com/mf-rayo/white-cat/blob/main/src/pages/ReportedCve.jsx): `src/pages/ReportedCve.jsx`
- [Disclaimer](https://github.com/mf-rayo/white-cat/blob/main/src/pages/Disclaimer.jsx): `src/pages/Disclaimer.jsx`

### Shared presentation

- [Page container](https://github.com/mf-rayo/white-cat/blob/main/src/components/Container.jsx): `src/components/Container.jsx`
- [Post table](https://github.com/mf-rayo/white-cat/blob/main/src/components/ui/table/Posts.jsx): `src/components/ui/table/Posts.jsx`
- [Source table](https://github.com/mf-rayo/white-cat/blob/main/src/components/ui/table/Source.jsx): `src/components/ui/table/Source.jsx`
- [Dashboard map](https://github.com/mf-rayo/white-cat/blob/main/src/components/ui/map/SimpleMap.jsx): `src/components/ui/map/SimpleMap.jsx`
- [Map rendering](https://github.com/mf-rayo/white-cat/blob/main/src/components/ui/map/Map.jsx): `src/components/ui/map/Map.jsx`
- [IOC details](https://github.com/mf-rayo/white-cat/blob/main/src/components/ui/details/screenshot.jsx): `src/components/ui/details/screenshot.jsx`
- [CVSS details](https://github.com/mf-rayo/white-cat/blob/main/src/components/ui/details/cvss.jsx): `src/components/ui/details/cvss.jsx`
- [Date formatting](https://github.com/mf-rayo/white-cat/blob/main/src/components/ui/date/FormatDate.jsx): `src/components/ui/date/FormatDate.jsx`
- [Badges](https://github.com/mf-rayo/white-cat/blob/main/src/components/ui/badge/Badge.jsx): `src/components/ui/badge/Badge.jsx`
- [Color mapping](https://github.com/mf-rayo/white-cat/blob/main/src/lib/hashColor.js): `src/lib/hashColor.js`
- [Copy data](https://github.com/mf-rayo/white-cat/blob/main/src/components/ui/clipboard/CopyData.jsx): `src/components/ui/clipboard/CopyData.jsx`
- [Alert context](https://github.com/mf-rayo/white-cat/blob/main/src/context/AlertContext.jsx): `src/context/AlertContext.jsx`
- [Error boundary](https://github.com/mf-rayo/white-cat/blob/main/src/hooks/ErrorBoundary.jsx): `src/hooks/ErrorBoundary.jsx`

### Other components

- **User**
- **FastAPI backend**

## Connections

- User → Router and layout: navigates (evidence: `src/App.jsx`)
- Router and layout → Dashboard: routes to (evidence: `src/App.jsx`)
- Router and layout → Reported IOCs: routes to (evidence: `src/App.jsx`)
- Router and layout → Active groups: routes to (evidence: `src/App.jsx`)
- Router and layout → Reported CVEs: routes to (evidence: `src/App.jsx`)
- Router and layout → Disclaimer: routes to (evidence: `src/App.jsx`)
- Dashboard → Dashboard data context: reads summary (evidence: `src/pages/Dashboard.jsx`)
- Dashboard data context → Cached fetch resource: loads data (evidence: `src/context/DashboardContext.jsx`)
- Dashboard data context → API endpoints: uses endpoint (evidence: `src/context/DashboardContext.jsx`)
- Active groups → Cached fetch resource: loads data (evidence: `src/pages/ActiveGroups.jsx`)
- Active groups → API endpoints: uses endpoint (evidence: `src/pages/ActiveGroups.jsx`)
- Reported IOCs → Cached fetch resource: loads data (evidence: `src/pages/Ioc.jsx`)
- Reported IOCs → API endpoints: uses endpoint (evidence: `src/pages/Ioc.jsx`)
- Reported CVEs → Cached fetch resource: loads data (evidence: `src/pages/ReportedCve.jsx`)
- Reported CVEs → API endpoints: uses endpoint (evidence: `src/pages/ReportedCve.jsx`)
- Cached fetch resource → FastAPI backend: requests data
- Dashboard → Page container: renders (evidence: `src/pages/Dashboard.jsx`)
- Active groups → Page container: renders (evidence: `src/pages/ActiveGroups.jsx`)
- Dashboard → Post table: renders (evidence: `src/pages/Dashboard.jsx`)
- Active groups → Post table: renders (evidence: `src/pages/ActiveGroups.jsx`)
- Dashboard → Source table: renders (evidence: `src/pages/Dashboard.jsx`)
- Dashboard → Dashboard map: renders (evidence: `src/pages/Dashboard.jsx`)
- Dashboard map → Map rendering: renders (evidence: `src/components/ui/map/SimpleMap.jsx`)
- Reported IOCs → IOC details: renders (evidence: `src/pages/Ioc.jsx`)
- Reported CVEs → CVSS details: renders (evidence: `src/pages/ReportedCve.jsx`)
- Dashboard → Date formatting: formats dates (evidence: `src/pages/Dashboard.jsx`)
- Reported CVEs → Date formatting: formats dates (evidence: `src/pages/ReportedCve.jsx`)
- IOC details → Date formatting: formats dates (evidence: `src/components/ui/details/screenshot.jsx`)
- Post table → Badges: uses (evidence: `src/components/ui/table/Posts.jsx`)
- Post table → Color mapping: colors labels (evidence: `src/components/ui/table/Posts.jsx`)
- IOC details → Copy data: copies value (evidence: `src/components/ui/details/screenshot.jsx`)
- Reported CVEs → Badges: uses (evidence: `src/pages/ReportedCve.jsx`)
- Error boundary → Alert context: reports errors (evidence: `src/hooks/ErrorBoundary.jsx`)
