# dvasyliev/react-crash-course architecture

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

- Interactive diagram: https://gitdiagram.com/dvasyliev/react-crash-course
- Repository: https://github.com/dvasyliev/react-crash-course

## Overview

This React product-list app lets a user browse sample products, expand specifications, mark favorites, buy one or two items, and filter a separate product listing by price. App owns product, favorite, and filter state; it renders the product cards and filter controls, which send user actions back through callbacks. The catalog is local sample data, and the entry point mounts the app and invokes optional web-vitals reporting. The source excerpts show these core interactions; asset contents and runtime behavior beyond the shown code are not inspected.

Main entry points: [`src/App.js`](https://github.com/dvasyliev/react-crash-course/blob/main/src/App.js) (App state and filtering), [`src/components/ProductCard.js`](https://github.com/dvasyliev/react-crash-course/blob/main/src/components/ProductCard.js) (Product card), [`src/components/ProductFilter.js`](https://github.com/dvasyliev/react-crash-course/blob/main/src/components/ProductFilter.js) (Price filter), [`src/index.js`](https://github.com/dvasyliev/react-crash-course/blob/main/src/index.js) (React entry point)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry and metrics"]
  node_entrypoint["React entry point<br/>[index.js]"]
  node_vitals["Web vitals reporting<br/>[reportWebVitals.js]"]
end

subgraph group_products["Product experience"]
  node_app["App state and filtering<br/>[App.js]"]
  node_list["Product list<br/>[ProductList.js]"]
  node_card["Product card<br/>[ProductCard.js]"]
  node_filter["Price filter<br/>[ProductFilter.js]"]
end

subgraph group_catalog["Catalog data and assets"]
  node_catalogdata["Sample products<br/>[products.js]"]
  node_images["Product images"]
end

node_user(("Shopper"))

node_entrypoint -->|"mounts"| node_app
node_entrypoint -->|"invokes"| node_vitals
node_app -->|"loads"| node_catalogdata
node_app -->|"renders"| node_list
node_app -->|"renders with callbacks"| node_card
node_app -->|"renders with filters"| node_filter
node_card -->|"calls purchase and favorite handlers"| node_app
node_filter -->|"calls filter handler"| node_app
node_catalogdata -->|"references image paths"| node_images
node_user -.->|"interacts with"| node_card
node_user -.->|"sets price range"| node_filter

click node_entrypoint "https://github.com/dvasyliev/react-crash-course/blob/main/src/index.js"
click node_app "https://github.com/dvasyliev/react-crash-course/blob/main/src/App.js"
click node_list "https://github.com/dvasyliev/react-crash-course/blob/main/src/components/ProductList.js"
click node_card "https://github.com/dvasyliev/react-crash-course/blob/main/src/components/ProductCard.js"
click node_filter "https://github.com/dvasyliev/react-crash-course/blob/main/src/components/ProductFilter.js"
click node_catalogdata "https://github.com/dvasyliev/react-crash-course/blob/main/src/data/products.js"
click node_images "https://github.com/dvasyliev/react-crash-course/tree/main/public/images"
click node_vitals "https://github.com/dvasyliev/react-crash-course/blob/main/src/reportWebVitals.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_entrypoint,node_vitals toneBlue
class node_app,node_list,node_card,node_filter toneAmber
class node_catalogdata,node_images toneMint
class node_user toneIndigo
```

## Components

### App entry and metrics

- [React entry point](https://github.com/dvasyliev/react-crash-course/blob/main/src/index.js): `src/index.js`
- [Web vitals reporting](https://github.com/dvasyliev/react-crash-course/blob/main/src/reportWebVitals.js): `src/reportWebVitals.js`

### Product experience

- [App state and filtering](https://github.com/dvasyliev/react-crash-course/blob/main/src/App.js): `src/App.js`
- [Product list](https://github.com/dvasyliev/react-crash-course/blob/main/src/components/ProductList.js): `src/components/ProductList.js`
- [Product card](https://github.com/dvasyliev/react-crash-course/blob/main/src/components/ProductCard.js): `src/components/ProductCard.js`
- [Price filter](https://github.com/dvasyliev/react-crash-course/blob/main/src/components/ProductFilter.js): `src/components/ProductFilter.js`

### Catalog data and assets

- [Sample products](https://github.com/dvasyliev/react-crash-course/blob/main/src/data/products.js): `src/data/products.js`
- [Product images](https://github.com/dvasyliev/react-crash-course/tree/main/public/images): `public/images`

### Other components

- **Shopper**

## Connections

- React entry point → App state and filtering: mounts (evidence: `src/index.js`)
- React entry point → Web vitals reporting: invokes (evidence: `src/index.js`)
- App state and filtering → Sample products: loads (evidence: `src/App.js`)
- App state and filtering → Product list: renders (evidence: `src/App.js`)
- App state and filtering → Product card: renders with callbacks (evidence: `src/App.js`)
- App state and filtering → Price filter: renders with filters (evidence: `src/App.js`)
- Product card → App state and filtering: calls purchase and favorite handlers (evidence: `src/components/ProductCard.js`)
- Price filter → App state and filtering: calls filter handler (evidence: `src/components/ProductFilter.js`)
- Sample products → Product images: references image paths (evidence: `src/data/products.js`)
- Shopper → Product card: interacts with
- Shopper → Price filter: sets price range
