# vtex-apps/store-theme architecture

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

- Interactive diagram: https://gitdiagram.com/vtex-apps/store-theme
- Repository: https://github.com/vtex-apps/store-theme

## Overview

##### Project type and purpose
- This is a VTEX IO “store theme” boilerplate—essentially a front-end theme for an e-commerce store built on VTEX’s React/GraphQL platform. It defines page layouts (store/blocks + routes.json) and styles (styles/css) and relies on VTEX’s Store Framework and Store GraphQL middleware to assemble and render a live store.

##### File structure
- Top-level files: GitHub CI configs, linting rules, CHANGELOG, manifest.json (VTEX app manifest), sitemap.
- store/ directory: JSONC block definitions per page (home, PDP, search, order-placed, header, footer, etc.). store/routes.json maps URLs to block trees.
- styles/: global and block-specific CSS configurations.
- docs/: project documentation and JSON schemas.

##### README for additional insights
- Confirms it ships as a VTEX IO app that stitches together open-source Store Component Apps (header, footer, shelf, search-result, etc.).
- Dependencies:
- VTEX Store Framework (the page renderer)
- Store GraphQL (middleware to all VTEX APIs)
- Individual Store Component Apps (each block corresponds to one).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Users
    Browser["End-user Browser"]:::user

    %% Developer & Repo
    Dev["Developer & GitHub Repo"]:::external

    %% CI/CD Pipeline
    subgraph "CI/CD Pipeline"
        CI1["GitHub Actions"]:::external
        CI2["VTEX IO Builder"]:::platform
        CDN["VTEX CDN"]:::platform
    end

    %% Theme App Code
    subgraph "Store Theme App (Blocks + Styles)" 
        subgraph "Block Definitions & Routes" 
            BlockDefs["store/blocks.jsonc"]:::theme
            Routes["store/routes.json"]:::theme
        end
        subgraph "Page Block Definitions"
            Home["home.jsonc"]:::theme
            PDP["product.jsonc"]:::theme
            Search["search.jsonc"]:::theme
            OrderPlaced["orderplaced.jsonc"]:::theme
            Minicart["minicart.jsonc"]:::theme
        end
        subgraph "Header & Footer"
            Header["header.jsonc"]:::theme
            Footer["footer.json"]:::theme
        end
        subgraph "Styles"
            StyleConfig["styles/configs/style.json"]:::theme
            GlobalCSS["vtex.store-components.css"]:::theme
            SearchCSS["search/vtex.product-summary.css"]:::theme
            SpecTableCSS["product-specification-table/vtex.product-specifications.css"]:::theme
        end
    end

    %% Documentation & Metadata
    Docs["Project Documentation"]:::external
    Schema["contact-schema.json"]:::external
    Manifest["manifest.json"]:::external
    Sitemap["sitemap.json"]:::external

    %% Runtime Platform
    SF["Store Framework (JS Bundle)"]:::platform
    GraphQL["Store GraphQL Middleware"]:::platform
    Services["VTEX Platform Services"]:::platform
    Components["Store Component Apps"]:::external

    %% Connections
    Dev --> CI1
    CI1 --> CI2
    CI2 --> CDN

    Browser --> CDN
    CDN --> SF
    SF -->|"reads routes"| Routes
    SF -->|"reads blocks"| BlockDefs
    Routes --> SF
    BlockDefs --> SF

    SF -->|"fetch data"| GraphQL
    GraphQL -->|"resolves to"| Services
    SF -->|"renders components"| Components
    Components -->|"updates UI"| Browser

    %% Documentation & Metadata links
    Dev --> Docs
    Dev --> Manifest
    Dev --> Sitemap
    Docs --> Schema

    %% Click Events
    click Dev "https://github.com/vtex-apps/store-theme/blob/master/.github/workflows/pull-request.yml"
    click CI1 "https://github.com/vtex-apps/store-theme/blob/master/.github/workflows/pull-request.yml"
    click CI2 "https://github.com/vtex-apps/store-theme/blob/master/manifest.json"
    click BlockDefs "https://github.com/vtex-apps/store-theme/blob/master/store/blocks.jsonc"
    click Routes "https://github.com/vtex-apps/store-theme/blob/master/store/routes.json"
    click Home "https://github.com/vtex-apps/store-theme/blob/master/store/blocks/home/home.jsonc"
    click PDP "https://github.com/vtex-apps/store-theme/blob/master/store/blocks/pdp/product.jsonc"
    click Search "https://github.com/vtex-apps/store-theme/blob/master/store/blocks/search.jsonc"
    click OrderPlaced "https://github.com/vtex-apps/store-theme/blob/master/store/blocks/orderplaced.jsonc"
    click Minicart "https://github.com/vtex-apps/store-theme/blob/master/store/blocks/minicart.jsonc"
    click Header "https://github.com/vtex-apps/store-theme/blob/master/store/blocks/header/header.jsonc"
    click Footer "https://github.com/vtex-apps/store-theme/blob/master/store/blocks/footer/footer.json"
    click StyleConfig "https://github.com/vtex-apps/store-theme/blob/master/styles/configs/style.json"
    click GlobalCSS "https://github.com/vtex-apps/store-theme/blob/master/styles/css/vtex.store-components.css"
    click SearchCSS "https://github.com/vtex-apps/store-theme/blob/master/styles/css/search/vtex.product-summary.css"
    click SpecTableCSS "https://github.com/vtex-apps/store-theme/blob/master/styles/css/product-specification-table/vtex.product-specifications.css"
    click Docs "https://github.com/vtex-apps/store-theme/blob/master/docs/README.md"
    click Schema "https://github.com/vtex-apps/store-theme/blob/master/docs/contact-schema.json"
    click Manifest "https://github.com/vtex-apps/store-theme/blob/master/manifest.json"
    click Sitemap "https://github.com/vtex-apps/store-theme/blob/master/sitemap/sitemap.json"

    %% Styles
    classDef theme fill:#bbdefb,stroke:#1e88e5,color:#0d47a1
    classDef platform fill:#c8e6c9,stroke:#43a047,color:#1b5e20
    classDef external fill:#eeeeee,stroke:#9e9e9e,color:#424242
    classDef user fill:#ffcc80,stroke:#fb8c00,color:#e65100
```
