# qajulio/cadastra-qa-challenge architecture

> Architecture diagram of the GitHub repository qajulio/cadastra-qa-challenge, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/qajulio/cadastra-qa-challenge
- Repository: https://github.com/qajulio/cadastra-qa-challenge

## Overview

Cadastra Editorial is an editorial fashion storefront: visitors browse curated home sections, filter and paginate collections, and view product details; the header also exposes cart interactions. Product pages read through a domain service and in-memory mock repository. Newsletter signup and subscriber administration use browser-local storage, as does cart state. The README documents the route and data-layer capabilities; unsampled integrations and component wiring are not inferred beyond indexed references.

Main entry points: [`src/app/page.tsx`](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/app/page.tsx) (Editorial home), [`src/app/layout.tsx`](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/app/layout.tsx) (Application layout), [`src/app/collections/page.tsx`](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/app/collections/page.tsx) (Collections page), [`src/services/products.service.ts`](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/services/products.service.ts) (Product domain service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront routes"]
  node_home["Editorial home<br/>[page.tsx]"]
  node_collections["Collections page<br/>[page.tsx]"]
  node_product_route["Product detail route<br/>[page.tsx]"]
end

subgraph group_catalog["Product catalog"]
  node_home_sections["Home sections<br/>[ProductSection.tsx]"]
  node_hero_featured["Editorial features"]
  node_filters["Collection filters"]
  node_product_grid["Product grid<br/>[ProductGrid.tsx]"]
  node_product_card["Product card<br/>[ProductCard.tsx]"]
  node_product_detail["Product detail<br/>[ProductDetail.tsx]"]
  node_product_service["Product domain service"]
  node_product_repository["Product repository"]
  node_mock_data["Catalog mock data<br/>[products.mock.ts]"]
end

subgraph group_engagement["Customer engagement"]
  node_newsletter["Newsletter signup<br/>[Newsletter.tsx]"]
  node_subscriber_hook["Subscriber state<br/>[useSubscribers.ts]"]
  node_subscriber_storage[("Subscriber storage<br/>[storage.ts]")]
  node_subscriber_admin["Subscriber admin"]
  node_subscriber_route["Subscriber page<br/>[page.tsx]"]
end

subgraph group_cart["Shopping cart"]
  node_cart_provider["Cart state<br/>[CartProvider.tsx]"]
  node_cart_storage[("Cart storage<br/>[storage.ts]")]
  node_cart_button["Cart button<br/>[CartButton.tsx]"]
  node_add_cart["Add to cart"]
  node_cart_drawer["Cart drawer<br/>[CartDrawer.tsx]"]
end

subgraph group_shell["Shared interface"]
  node_app_layout["Application layout<br/>[layout.tsx]"]
  node_header["Site header<br/>[Header.tsx]"]
  node_footer["Site footer<br/>[Footer.tsx]"]
  node_search["Header search<br/>[HeaderSearch.tsx]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_home
node_visitor -->|"browses"| node_collections
node_visitor -.->|"views"| node_product_route
node_visitor -.->|"subscribes"| node_newsletter
node_home -->|"requests data"| node_product_service
node_home -->|"renders"| node_hero_featured
node_home -->|"renders"| node_home_sections
node_home -->|"renders"| node_newsletter
node_collections -->|"requests data"| node_product_service
node_collections -->|"renders"| node_filters
node_collections -->|"renders"| node_product_grid
node_product_route -->|"requests data"| node_product_service
node_product_route -->|"renders"| node_product_detail
node_home_sections -->|"renders"| node_product_grid
node_product_grid -->|"renders"| node_product_card
node_product_detail -->|"renders"| node_add_cart
node_product_service -->|"delegates to"| node_product_repository
node_product_repository -->|"reads"| node_mock_data
node_newsletter -->|"uses state"| node_subscriber_hook
node_subscriber_hook -->|"loads and saves"| node_subscriber_storage
node_subscriber_route -->|"renders"| node_subscriber_admin
node_subscriber_admin -->|"uses state"| node_subscriber_hook
node_app_layout -->|"renders"| node_header
node_app_layout -->|"renders"| node_footer
node_app_layout -->|"provides cart"| node_cart_provider
node_app_layout -->|"renders"| node_cart_drawer
node_header -->|"renders"| node_search
node_header -->|"renders"| node_cart_button
node_cart_provider -->|"loads and saves"| node_cart_storage
node_cart_drawer -->|"uses state"| node_cart_provider

click node_home "https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/app/page.tsx"
click node_collections "https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/app/collections/page.tsx"
click node_product_route "https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/app/products/%5Bslug%5D/page.tsx"
click node_home_sections "https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/products/components/ProductSection.tsx"
click node_hero_featured "https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/products/components/FeaturedCollections.tsx"
click node_filters "https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/products/components/CollectionFilters.tsx"
click node_product_grid "https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/products/components/ProductGrid.tsx"
click node_product_card "https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/products/components/ProductCard.tsx"
click node_product_detail "https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/products/components/ProductDetail.tsx"
click node_product_service "https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/services/products.service.ts"
click node_product_repository "https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/repositories/products.repository.ts"
click node_mock_data "https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/products/data/products.mock.ts"
click node_newsletter "https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/components/layout/Newsletter.tsx"
click node_subscriber_hook "https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/subscribers/useSubscribers.ts"
click node_subscriber_storage "https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/subscribers/storage.ts"
click node_subscriber_admin "https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/subscribers/components/SubscribersAdmin.tsx"
click node_subscriber_route "https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/app/subscribers/page.tsx"
click node_cart_provider "https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/cart/CartProvider.tsx"
click node_cart_storage "https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/cart/storage.ts"
click node_cart_button "https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/cart/components/CartButton.tsx"
click node_add_cart "https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/cart/components/AddToCartButton.tsx"
click node_cart_drawer "https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/cart/components/CartDrawer.tsx"
click node_app_layout "https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/app/layout.tsx"
click node_header "https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/components/layout/Header.tsx"
click node_footer "https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/components/layout/Footer.tsx"
click node_search "https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/components/layout/HeaderSearch.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_collections,node_product_route toneBlue
class node_home_sections,node_hero_featured,node_filters,node_product_grid,node_product_card,node_product_detail,node_product_service,node_product_repository,node_mock_data toneAmber
class node_newsletter,node_subscriber_hook,node_subscriber_storage,node_subscriber_admin,node_subscriber_route toneMint
class node_cart_provider,node_cart_storage,node_cart_button,node_add_cart,node_cart_drawer toneRose
class node_app_layout,node_header,node_footer,node_search,node_visitor toneIndigo
```

## Components

### Storefront routes

- [Editorial home](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Collections page](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/app/collections/page.tsx): `src/app/collections/page.tsx`
- [Product detail route](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/app/products/%5Bslug%5D/page.tsx): `src/app/products/[slug]/page.tsx`

### Product catalog

- [Home sections](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/products/components/ProductSection.tsx): `src/features/products/components/ProductSection.tsx`
- [Editorial features](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/products/components/FeaturedCollections.tsx): `src/features/products/components/FeaturedCollections.tsx`
- [Collection filters](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/products/components/CollectionFilters.tsx): `src/features/products/components/CollectionFilters.tsx`
- [Product grid](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/products/components/ProductGrid.tsx): `src/features/products/components/ProductGrid.tsx`
- [Product card](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/products/components/ProductCard.tsx): `src/features/products/components/ProductCard.tsx`
- [Product detail](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/products/components/ProductDetail.tsx): `src/features/products/components/ProductDetail.tsx`
- [Product domain service](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/services/products.service.ts): `src/services/products.service.ts`
- [Product repository](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/repositories/products.repository.ts): `src/repositories/products.repository.ts`
- [Catalog mock data](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/products/data/products.mock.ts): `src/features/products/data/products.mock.ts`

### Customer engagement

- [Newsletter signup](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/components/layout/Newsletter.tsx): `src/components/layout/Newsletter.tsx`
- [Subscriber state](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/subscribers/useSubscribers.ts): `src/features/subscribers/useSubscribers.ts`
- [Subscriber storage](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/subscribers/storage.ts): `src/features/subscribers/storage.ts`
- [Subscriber admin](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/subscribers/components/SubscribersAdmin.tsx): `src/features/subscribers/components/SubscribersAdmin.tsx`
- [Subscriber page](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/app/subscribers/page.tsx): `src/app/subscribers/page.tsx`

### Shopping cart

- [Cart state](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/cart/CartProvider.tsx): `src/features/cart/CartProvider.tsx`
- [Cart storage](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/cart/storage.ts): `src/features/cart/storage.ts`
- [Cart button](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/cart/components/CartButton.tsx): `src/features/cart/components/CartButton.tsx`
- [Add to cart](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/cart/components/AddToCartButton.tsx): `src/features/cart/components/AddToCartButton.tsx`
- [Cart drawer](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/features/cart/components/CartDrawer.tsx): `src/features/cart/components/CartDrawer.tsx`

### Shared interface

- [Application layout](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/app/layout.tsx): `src/app/layout.tsx`
- [Site header](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/components/layout/Header.tsx): `src/components/layout/Header.tsx`
- [Site footer](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/components/layout/Footer.tsx): `src/components/layout/Footer.tsx`
- [Header search](https://github.com/qajulio/cadastra-qa-challenge/blob/main/src/components/layout/HeaderSearch.tsx): `src/components/layout/HeaderSearch.tsx`

### Other components

- **Visitor**

## Connections

- Visitor → Editorial home: opens (evidence: `src/app/page.tsx`)
- Visitor → Collections page: browses (evidence: `src/app/collections/page.tsx`)
- Visitor → Product detail route: views
- Visitor → Newsletter signup: subscribes
- Editorial home → Product domain service: requests data (evidence: `src/app/page.tsx`)
- Editorial home → Editorial features: renders (evidence: `src/app/page.tsx`)
- Editorial home → Home sections: renders (evidence: `src/app/page.tsx`)
- Editorial home → Newsletter signup: renders (evidence: `src/app/page.tsx`)
- Collections page → Product domain service: requests data (evidence: `src/app/collections/page.tsx`)
- Collections page → Collection filters: renders (evidence: `src/app/collections/page.tsx`)
- Collections page → Product grid: renders (evidence: `src/app/collections/page.tsx`)
- Product detail route → Product domain service: requests data (evidence: `src/app/products/[slug]/page.tsx`)
- Product detail route → Product detail: renders (evidence: `src/app/products/[slug]/page.tsx`)
- Home sections → Product grid: renders (evidence: `src/features/products/components/ProductSection.tsx`)
- Product grid → Product card: renders (evidence: `src/features/products/components/ProductGrid.tsx`)
- Product detail → Add to cart: renders (evidence: `src/features/products/components/ProductDetail.tsx`)
- Product domain service → Product repository: delegates to (evidence: `src/services/products.service.ts`)
- Product repository → Catalog mock data: reads (evidence: `src/repositories/products.repository.ts`)
- Newsletter signup → Subscriber state: uses state (evidence: `src/components/layout/Newsletter.tsx`)
- Subscriber state → Subscriber storage: loads and saves (evidence: `src/features/subscribers/useSubscribers.ts`)
- Subscriber page → Subscriber admin: renders (evidence: `src/app/subscribers/page.tsx`)
- Subscriber admin → Subscriber state: uses state (evidence: `src/features/subscribers/components/SubscribersAdmin.tsx`)
- Application layout → Site header: renders (evidence: `src/app/layout.tsx`)
- Application layout → Site footer: renders (evidence: `src/app/layout.tsx`)
- Application layout → Cart state: provides cart (evidence: `src/app/layout.tsx`)
- Application layout → Cart drawer: renders (evidence: `src/app/layout.tsx`)
- Site header → Header search: renders (evidence: `src/components/layout/Header.tsx`)
- Site header → Cart button: renders (evidence: `src/components/layout/Header.tsx`)
- Cart state → Cart storage: loads and saves (evidence: `src/features/cart/CartProvider.tsx`)
- Cart drawer → Cart state: uses state (evidence: `src/features/cart/components/CartDrawer.tsx`)
