# dc989/svecicezaauto architecture

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

## Overview

This repository is a bilingual Serbian/Russian auto-ignition-parts catalog storefront. A visitor browses categories or searches by part number, opens a product page, and can check vehicle compatibility and contact the seller about price or availability. Product loading, category filtering, and search-index generation are visible in the sampled utility; page-to-component wiring and several page behaviors are inferred from the tree, so those links are shown as unverified. The README is an untouched Astro starter and does not document product capabilities.

Main entry points: [`src/layouts/BaseLayout.astro`](https://github.com/dc989/svecicezaauto/blob/master/src/layouts/BaseLayout.astro) (Base layout), [`src/utils/products.ts`](https://github.com/dc989/svecicezaauto/blob/master/src/utils/products.ts) (Product queries), [`src/pages`](https://github.com/dc989/svecicezaauto/tree/master/src/pages) (Route handlers), [`src/components/pages/CategoryPage.astro`](https://github.com/dc989/svecicezaauto/blob/master/src/components/pages/CategoryPage.astro) (Category listings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Catalog storefront"]
  node_home["Home page<br/>[HomePage.astro]"]
  node_category["Category listings<br/>[CategoryPage.astro]"]
  node_search["Search results<br/>[SearchPage.astro]"]
  node_product["Product details<br/>[ProductPage.astro]"]
  node_routepages["Route handlers"]
  node_searchapi["Search index API"]
end

subgraph group_productdata["Product data"]
  node_producthelpers["Product queries<br/>[products.ts]"]
  node_productfile[("Product catalog<br/>[products.json]")]
  node_searchindex["Search index"]
end

subgraph group_localization["Localization"]
  node_translations["UI translations<br/>[ui.ts]"]
  node_localehelpers["Locale helpers<br/>[utils.ts]"]
end

subgraph group_sharedui["Shared presentation"]
  node_layout["Base layout<br/>[BaseLayout.astro]"]
  node_header["Site header<br/>[Header.astro]"]
  node_footer["Site footer<br/>[Footer.astro]"]
end

node_visitor(("Visitor"))

node_visitor -.->|"opens pages"| node_routepages
node_routepages -.->|"renders"| node_home
node_routepages -.->|"renders"| node_category
node_routepages -.->|"renders"| node_search
node_routepages -.->|"renders"| node_product
node_visitor -.->|"requests index"| node_searchapi
node_searchapi -->|"generates index"| node_producthelpers
node_producthelpers -->|"reads catalog"| node_productfile
node_producthelpers -->|"returns records"| node_searchindex
node_producthelpers -.->|"provides category data"| node_category
node_producthelpers -.->|"provides product data"| node_product
node_producthelpers -.->|"provides search data"| node_search
node_layout -.->|"renders"| node_header
node_layout -.->|"renders"| node_footer
node_localehelpers -->|"uses translations"| node_translations
node_layout -.->|"resolves locale"| node_localehelpers
node_home -.->|"uses layout"| node_layout
node_category -.->|"uses layout"| node_layout
node_search -.->|"uses layout"| node_layout
node_product -.->|"uses layout"| node_layout

click node_home "https://github.com/dc989/svecicezaauto/blob/master/src/components/pages/HomePage.astro"
click node_category "https://github.com/dc989/svecicezaauto/blob/master/src/components/pages/CategoryPage.astro"
click node_search "https://github.com/dc989/svecicezaauto/blob/master/src/components/pages/SearchPage.astro"
click node_product "https://github.com/dc989/svecicezaauto/blob/master/src/components/pages/ProductPage.astro"
click node_routepages "https://github.com/dc989/svecicezaauto/tree/master/src/pages"
click node_searchapi "https://github.com/dc989/svecicezaauto/blob/master/src/pages/search-index.json.ts"
click node_producthelpers "https://github.com/dc989/svecicezaauto/blob/master/src/utils/products.ts"
click node_productfile "https://github.com/dc989/svecicezaauto/blob/master/src/data/products.json"
click node_translations "https://github.com/dc989/svecicezaauto/blob/master/src/i18n/ui.ts"
click node_localehelpers "https://github.com/dc989/svecicezaauto/blob/master/src/i18n/utils.ts"
click node_layout "https://github.com/dc989/svecicezaauto/blob/master/src/layouts/BaseLayout.astro"
click node_header "https://github.com/dc989/svecicezaauto/blob/master/src/components/Header.astro"
click node_footer "https://github.com/dc989/svecicezaauto/blob/master/src/components/Footer.astro"

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_category,node_search,node_product,node_routepages,node_searchapi toneBlue
class node_producthelpers,node_productfile,node_searchindex toneAmber
class node_translations,node_localehelpers toneMint
class node_layout,node_header,node_footer toneRose
class node_visitor toneIndigo
```

## Components

### Catalog storefront

- [Home page](https://github.com/dc989/svecicezaauto/blob/master/src/components/pages/HomePage.astro): `src/components/pages/HomePage.astro`
- [Category listings](https://github.com/dc989/svecicezaauto/blob/master/src/components/pages/CategoryPage.astro): `src/components/pages/CategoryPage.astro`
- [Search results](https://github.com/dc989/svecicezaauto/blob/master/src/components/pages/SearchPage.astro): `src/components/pages/SearchPage.astro`
- [Product details](https://github.com/dc989/svecicezaauto/blob/master/src/components/pages/ProductPage.astro): `src/components/pages/ProductPage.astro`
- [Route handlers](https://github.com/dc989/svecicezaauto/tree/master/src/pages): `src/pages`
- [Search index API](https://github.com/dc989/svecicezaauto/blob/master/src/pages/search-index.json.ts): `src/pages/search-index.json.ts`

### Product data

- [Product queries](https://github.com/dc989/svecicezaauto/blob/master/src/utils/products.ts): `src/utils/products.ts`
- [Product catalog](https://github.com/dc989/svecicezaauto/blob/master/src/data/products.json): `src/data/products.json`
- **Search index**

### Localization

- [UI translations](https://github.com/dc989/svecicezaauto/blob/master/src/i18n/ui.ts): `src/i18n/ui.ts`
- [Locale helpers](https://github.com/dc989/svecicezaauto/blob/master/src/i18n/utils.ts): `src/i18n/utils.ts`

### Shared presentation

- [Base layout](https://github.com/dc989/svecicezaauto/blob/master/src/layouts/BaseLayout.astro): `src/layouts/BaseLayout.astro`
- [Site header](https://github.com/dc989/svecicezaauto/blob/master/src/components/Header.astro): `src/components/Header.astro`
- [Site footer](https://github.com/dc989/svecicezaauto/blob/master/src/components/Footer.astro): `src/components/Footer.astro`

### Other components

- **Visitor**

## Connections

- Visitor → Route handlers: opens pages
- Route handlers → Home page: renders
- Route handlers → Category listings: renders
- Route handlers → Search results: renders
- Route handlers → Product details: renders
- Visitor → Search index API: requests index
- Search index API → Product queries: generates index (evidence: `src/pages/search-index.json.ts`)
- Product queries → Product catalog: reads catalog (evidence: `src/utils/products.ts`)
- Product queries → Search index: returns records (evidence: `src/utils/products.ts`)
- Product queries → Category listings: provides category data
- Product queries → Product details: provides product data
- Product queries → Search results: provides search data
- Base layout → Site header: renders
- Base layout → Site footer: renders
- Locale helpers → UI translations: uses translations (evidence: `src/i18n/utils.ts`)
- Base layout → Locale helpers: resolves locale
- Home page → Base layout: uses layout
- Category listings → Base layout: uses layout
- Search results → Base layout: uses layout
- Product details → Base layout: uses layout
