# mateispic/hw-dashboard architecture

> Architecture diagram of the GitHub repository mateispic/hw-dashboard, 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/mateispic/hw-dashboard
- Repository: https://github.com/mateispic/hw-dashboard

## Overview

hw-dashboard is a Next.js Hot Wheels product dashboard. A browser request reaches the server-rendered home page, which fetches product records from Supabase and renders counts and a product grid; the grid presents product details and outbound product links. The README also documents source filtering, title search, sorting, new-product badges, image fallbacks, and five-minute ISR caching. Those browsing capabilities are represented with the grid rather than split into speculative modules. The sampled source establishes the fetch and rendering calls; no separate ingestion or persistence workflow is shown.

Main entry points: [`app/page.js`](https://github.com/mateispic/hw-dashboard/blob/main/app/page.js) (Home page), [`lib/supabase.js`](https://github.com/mateispic/hw-dashboard/blob/main/lib/supabase.js) (Product fetch), [`components/ProductGrid.js`](https://github.com/mateispic/hw-dashboard/blob/main/components/ProductGrid.js) (Product browsing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["Dashboard presentation"]
  node_home["Home page<br/>[page.js]"]
  node_product_grid["Product browsing<br/>[ProductGrid.js]"]
end

subgraph group_data_access["Product data access"]
  node_product_fetch["Product fetch<br/>[supabase.js]"]
end

node_visitor(("Dashboard visitor"))
node_supabase["Supabase REST"]

node_visitor -->|"requests"| node_home
node_home -->|"calls"| node_product_fetch
node_product_fetch -->|"requests records"| node_supabase
node_home -->|"renders products"| node_product_grid

click node_home "https://github.com/mateispic/hw-dashboard/blob/main/app/page.js"
click node_product_grid "https://github.com/mateispic/hw-dashboard/blob/main/components/ProductGrid.js"
click node_product_fetch "https://github.com/mateispic/hw-dashboard/blob/main/lib/supabase.js"

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_home,node_product_grid toneBlue
class node_product_fetch toneAmber
class node_visitor,node_supabase toneIndigo
```

## Components

### Dashboard presentation

- [Home page](https://github.com/mateispic/hw-dashboard/blob/main/app/page.js): `app/page.js`
- [Product browsing](https://github.com/mateispic/hw-dashboard/blob/main/components/ProductGrid.js): `components/ProductGrid.js`

### Product data access

- [Product fetch](https://github.com/mateispic/hw-dashboard/blob/main/lib/supabase.js): `lib/supabase.js`

### Other components

- **Dashboard visitor**
- **Supabase REST**

## Connections

- Dashboard visitor → Home page: requests (evidence: `README.md`)
- Home page → Product fetch: calls (evidence: `app/page.js`)
- Product fetch → Supabase REST: requests records (evidence: `lib/supabase.js`)
- Home page → Product browsing: renders products (evidence: `app/page.js`)
