# bruno-sf-dev/sneaker-store architecture

> Architecture diagram of the GitHub repository bruno-sf-dev/sneaker-store, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bruno-sf-dev/sneaker-store
- Repository: https://github.com/bruno-sf-dev/sneaker-store

## Overview

SNKRS is a Next.js sneaker storefront. Shoppers browse a filterable, sortable, paginated catalog or search by URL query, open sneaker detail pages, and add products to a cart. The graph keeps listing, search, detail, and cart as distinct product stages, with API services and URL-driven catalog state as internal layers. Edges are limited to relationships visible in excerpts or the SOURCE INDEX; several unsampled UI and API internals are therefore shown without speculative connections.

Main entry points: [`src/app/(store)/(home)/page.tsx`](https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/app/(store)/(home)/page.tsx) (Catalog page), [`src/app/(store)/(home)/components/home-product-list/index.tsx`](https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/app/(store)/(home)/components/home-product-list/index.tsx) (Product listing), [`src/app/(store)/search/page.tsx`](https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/app/(store)/search/page.tsx) (Search page), [`src/app/(store)/search/components/search-product-list/index.tsx`](https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/app/(store)/search/components/search-product-list/index.tsx) (Search results)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browse["Catalog browsing"]
  node_home["Catalog page<br/>[page.tsx]"]
  node_listing["Product listing<br/>[index.tsx]"]
  node_filters["Filter controls"]
  node_sorting["Sort controls<br/>[index.tsx]"]
  node_pagination["Pagination<br/>[index.tsx]"]
  node_layoutstate["Grid layout state"]
end

subgraph group_discovery["Search and product detail"]
  node_searchform["Search form<br/>[index..tsx]"]
  node_searchpage["Search page<br/>[page.tsx]"]
  node_searchresults["Search results<br/>[index.tsx]"]
  node_detailpage["Product page<br/>[page.tsx]"]
  node_detailview["Product details<br/>[index.tsx]"]
  node_addcart["Add to cart<br/>[index.tsx]"]
end

subgraph group_shared["Shared storefront UI"]
  node_card["Product card<br/>[index.tsx]"]
  node_skeleton["Loading skeleton<br/>[skeleton.tsx]"]
end

subgraph group_runtime["Data and state"]
  node_cartstate["Cart state<br/>[cart-context.tsx]"]
  node_api["API client<br/>[api.ts]"]
  node_allservice["Catalog service"]
  node_searchservice["Search service"]
  node_detailservice["Sneaker service<br/>[get-sneaker.ts]"]
  node_types["Sneaker model<br/>[sneakers.ts]"]
end

node_shopper(("Shopper"))

node_shopper -->|"browses"| node_home
node_shopper -->|"searches"| node_searchform
node_shopper -->|"opens product"| node_detailpage
node_home -->|"renders"| node_listing
node_home -->|"renders"| node_filters
node_home -->|"renders"| node_sorting
node_home -->|"provides state"| node_layoutstate
node_listing -->|"fetches catalog"| node_allservice
node_listing -->|"renders items"| node_card
node_listing -->|"renders"| node_pagination
node_home -->|"shows loading"| node_skeleton
node_searchform -.->|"submits query"| node_searchpage
node_searchpage -->|"renders"| node_searchresults
node_searchpage -->|"shows loading"| node_skeleton
node_searchresults -->|"fetches matches"| node_searchservice
node_searchresults -->|"renders items"| node_card
node_detailpage -->|"renders"| node_detailview
node_detailview -->|"fetches sneaker"| node_detailservice
node_detailview -->|"renders purchase"| node_addcart
node_detailpage -->|"shows loading"| node_skeleton
node_addcart -.->|"adds item"| node_cartstate
node_allservice -->|"requests data"| node_api
node_searchservice -->|"requests data"| node_api
node_allservice -->|"returns sneakers"| node_types
node_searchservice -->|"returns sneakers"| node_types
node_card -->|"displays sneaker"| node_types

click node_home "https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/app/(store)/(home)/page.tsx"
click node_listing "https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/app/(store)/(home)/components/home-product-list/index.tsx"
click node_filters "https://github.com/bruno-sf-dev/sneaker-store/tree/master/src/app/(store)/(home)/components/home-sidebar-filter"
click node_sorting "https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/app/(store)/(home)/components/home-sort-by/index.tsx"
click node_pagination "https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/app/(store)/(home)/components/home-pagination/index.tsx"
click node_layoutstate "https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/contexts/home-layout-context.tsx"
click node_searchform "https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/components/app-header/header-search-form/index..tsx"
click node_searchpage "https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/app/(store)/search/page.tsx"
click node_searchresults "https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/app/(store)/search/components/search-product-list/index.tsx"
click node_detailpage "https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/app/(store)/product/%5Bslug%5D/page.tsx"
click node_detailview "https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/app/(store)/product/%5Bslug%5D/components/product-view/index.tsx"
click node_addcart "https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/app/(store)/product/%5Bslug%5D/components/product-info-to-buy/index.tsx"
click node_cartstate "https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/contexts/cart-context.tsx"
click node_api "https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/api/api.ts"
click node_allservice "https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/api/services/get-all-sneakers.ts"
click node_searchservice "https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/api/services/get-search-sneakers.ts"
click node_detailservice "https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/api/services/get-sneaker.ts"
click node_types "https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/api/data/types/sneakers.ts"
click node_card "https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/components/product-card/index.tsx"
click node_skeleton "https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/components/skeletons/skeleton.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_home,node_listing,node_filters,node_sorting,node_pagination,node_layoutstate toneBlue
class node_searchform,node_searchpage,node_searchresults,node_detailpage,node_detailview,node_addcart toneAmber
class node_card,node_skeleton toneMint
class node_cartstate,node_api,node_allservice,node_searchservice,node_detailservice,node_types toneRose
class node_shopper toneIndigo
```

## Components

### Catalog browsing

- [Catalog page](https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/app/(store)/(home)/page.tsx): `src/app/(store)/(home)/page.tsx`
- [Product listing](https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/app/(store)/(home)/components/home-product-list/index.tsx): `src/app/(store)/(home)/components/home-product-list/index.tsx`
- [Filter controls](https://github.com/bruno-sf-dev/sneaker-store/tree/master/src/app/(store)/(home)/components/home-sidebar-filter): `src/app/(store)/(home)/components/home-sidebar-filter`
- [Sort controls](https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/app/(store)/(home)/components/home-sort-by/index.tsx): `src/app/(store)/(home)/components/home-sort-by/index.tsx`
- [Pagination](https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/app/(store)/(home)/components/home-pagination/index.tsx): `src/app/(store)/(home)/components/home-pagination/index.tsx`
- [Grid layout state](https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/contexts/home-layout-context.tsx): `src/contexts/home-layout-context.tsx`

### Search and product detail

- [Search form](https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/components/app-header/header-search-form/index..tsx): `src/components/app-header/header-search-form/index..tsx`
- [Search page](https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/app/(store)/search/page.tsx): `src/app/(store)/search/page.tsx`
- [Search results](https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/app/(store)/search/components/search-product-list/index.tsx): `src/app/(store)/search/components/search-product-list/index.tsx`
- [Product page](https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/app/(store)/product/%5Bslug%5D/page.tsx): `src/app/(store)/product/[slug]/page.tsx`
- [Product details](https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/app/(store)/product/%5Bslug%5D/components/product-view/index.tsx): `src/app/(store)/product/[slug]/components/product-view/index.tsx`
- [Add to cart](https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/app/(store)/product/%5Bslug%5D/components/product-info-to-buy/index.tsx): `src/app/(store)/product/[slug]/components/product-info-to-buy/index.tsx`

### Shared storefront UI

- [Product card](https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/components/product-card/index.tsx): `src/components/product-card/index.tsx`
- [Loading skeleton](https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/components/skeletons/skeleton.tsx): `src/components/skeletons/skeleton.tsx`

### Data and state

- [Cart state](https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/contexts/cart-context.tsx): `src/contexts/cart-context.tsx`
- [API client](https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/api/api.ts): `src/api/api.ts`
- [Catalog service](https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/api/services/get-all-sneakers.ts): `src/api/services/get-all-sneakers.ts`
- [Search service](https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/api/services/get-search-sneakers.ts): `src/api/services/get-search-sneakers.ts`
- [Sneaker service](https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/api/services/get-sneaker.ts): `src/api/services/get-sneaker.ts`
- [Sneaker model](https://github.com/bruno-sf-dev/sneaker-store/blob/master/src/api/data/types/sneakers.ts): `src/api/data/types/sneakers.ts`

### Other components

- **Shopper**

## Connections

- Shopper → Catalog page: browses
- Shopper → Search form: searches
- Shopper → Product page: opens product
- Catalog page → Product listing: renders (evidence: `src/app/(store)/(home)/page.tsx`)
- Catalog page → Filter controls: renders (evidence: `src/app/(store)/(home)/page.tsx`)
- Catalog page → Sort controls: renders (evidence: `src/app/(store)/(home)/page.tsx`)
- Catalog page → Grid layout state: provides state (evidence: `src/app/(store)/(home)/page.tsx`)
- Product listing → Catalog service: fetches catalog (evidence: `src/app/(store)/(home)/components/home-product-list/index.tsx`)
- Product listing → Product card: renders items (evidence: `src/app/(store)/(home)/components/home-product-list/index.tsx`)
- Product listing → Pagination: renders (evidence: `src/app/(store)/(home)/components/home-product-list/index.tsx`)
- Catalog page → Loading skeleton: shows loading (evidence: `src/app/(store)/(home)/page.tsx`)
- Search form → Search page: submits query
- Search page → Search results: renders (evidence: `src/app/(store)/search/page.tsx`)
- Search page → Loading skeleton: shows loading (evidence: `src/app/(store)/search/page.tsx`)
- Search results → Search service: fetches matches (evidence: `src/app/(store)/search/components/search-product-list/index.tsx`)
- Search results → Product card: renders items (evidence: `src/app/(store)/search/components/search-product-list/index.tsx`)
- Product page → Product details: renders (evidence: `src/app/(store)/product/[slug]/page.tsx`)
- Product details → Sneaker service: fetches sneaker (evidence: `src/app/(store)/product/[slug]/components/product-view/index.tsx`)
- Product details → Add to cart: renders purchase (evidence: `src/app/(store)/product/[slug]/components/product-view/index.tsx`)
- Product page → Loading skeleton: shows loading (evidence: `src/app/(store)/product/[slug]/page.tsx`)
- Add to cart → Cart state: adds item
- Catalog service → API client: requests data (evidence: `src/api/services/get-all-sneakers.ts`)
- Search service → API client: requests data (evidence: `src/api/services/get-search-sneakers.ts`)
- Catalog service → Sneaker model: returns sneakers (evidence: `src/api/services/get-all-sneakers.ts`)
- Search service → Sneaker model: returns sneakers (evidence: `src/api/services/get-search-sneakers.ts`)
- Product card → Sneaker model: displays sneaker (evidence: `src/components/product-card/index.tsx`)
