# zvekadev/smartour architecture

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

- Interactive diagram: https://gitdiagram.com/zvekadev/smartour
- Repository: https://github.com/zvekadev/smartour

## Overview

Smartour is a multilingual tourism site backed by Sanity: visitors browse tourism offers, locations, stories, and site information, while editors manage the content in Sanity Studio. The sampled runtime shows offer, blog, transport, About Us, and site-settings data being fetched from Sanity; offer data also supplies summaries and localized links for browsing. The tree includes client scripts for filtering, galleries, maps, and contact forms, but no page sources showing how they are wired. This map reflects the available source evidence, not an inspected full request flow.

Main entry points: [`studio/schemaTypes/index.ts`](https://github.com/zvekadev/smartour/blob/main/studio/schemaTypes/index.ts) (Schema registry), [`src/lib/sanity.ts`](https://github.com/zvekadev/smartour/blob/main/src/lib/sanity.ts) (Sanity client), [`src/lib/offers.ts`](https://github.com/zvekadev/smartour/blob/main/src/lib/offers.ts) (Offer browsing), [`studio/sanity.config.ts`](https://github.com/zvekadev/smartour/blob/main/studio/sanity.config.ts) (Studio configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Tourism site"]
  node_offer_browse["Offer browsing<br/>[offers.ts]"]
  node_offer_filter["Offer filters"]
  node_offer_gallery["Offer gallery"]
  node_map["Offer map<br/>[map.client.ts]"]
  node_contact_form["Contact form"]
end

subgraph group_content["Content access"]
  node_blog_content["Blog content<br/>[posts.ts]"]
  node_about_content["About content<br/>[aboutUs.ts]"]
  node_transport_content["Transport content<br/>[transport.ts]"]
  node_site_settings["Site settings data<br/>[partners.ts]"]
  node_sanity_client["Sanity client<br/>[sanity.ts]"]
  node_sanity[("Sanity CMS")]
end

subgraph group_studio["Sanity Studio"]
  node_studio_config["Studio configuration<br/>[sanity.config.ts]"]
  node_schema_registry["Schema registry<br/>[index.ts]"]
  node_offer_schema["Offer schema<br/>[offer.ts]"]
  node_blog_schema["Blog schema<br/>[blogPost.ts]"]
  node_about_schema["About schema<br/>[aboutUs.ts]"]
  node_transport_schema["Transport schema<br/>[transportPage.ts]"]
  node_settings_schema["Settings schema<br/>[siteSettings.ts]"]
  node_taxonomy_schemas["Location schemas"]
  node_localized_objects["Localized objects"]
end

subgraph group_localization["Localization"]
  node_ui_locales["UI translations<br/>[ui.ts]"]
  node_extra_categories["Extra categories<br/>[categoriesExtra.ts]"]
end

node_visitor(("Visitor"))
node_studio_editor(("Content editor"))

node_visitor -.->|"browses offers"| node_offer_browse
node_offer_browse -->|"fetches offers"| node_sanity_client
node_blog_content -->|"fetches posts"| node_sanity_client
node_about_content -->|"fetches content"| node_sanity_client
node_transport_content -->|"fetches content"| node_sanity_client
node_site_settings -->|"fetches settings"| node_sanity_client
node_sanity_client -->|"queries"| node_sanity
node_studio_editor -.->|"edits content"| node_studio_config
node_studio_config -->|"registers schemas"| node_schema_registry
node_schema_registry -->|"registers"| node_offer_schema
node_schema_registry -->|"registers"| node_blog_schema
node_schema_registry -->|"registers"| node_about_schema
node_schema_registry -->|"registers"| node_transport_schema
node_schema_registry -->|"registers"| node_settings_schema
node_schema_registry -->|"registers"| node_taxonomy_schemas
node_schema_registry -->|"registers"| node_localized_objects

click node_offer_browse "https://github.com/zvekadev/smartour/blob/main/src/lib/offers.ts"
click node_offer_filter "https://github.com/zvekadev/smartour/blob/main/src/scripts/offersFilter.client.ts"
click node_offer_gallery "https://github.com/zvekadev/smartour/blob/main/src/scripts/offerGallery.client.ts"
click node_map "https://github.com/zvekadev/smartour/blob/main/src/scripts/map.client.ts"
click node_contact_form "https://github.com/zvekadev/smartour/blob/main/src/scripts/contactForm.client.ts"
click node_blog_content "https://github.com/zvekadev/smartour/blob/main/src/data/blog/posts.ts"
click node_about_content "https://github.com/zvekadev/smartour/blob/main/src/data/aboutUs.ts"
click node_transport_content "https://github.com/zvekadev/smartour/blob/main/src/lib/transport.ts"
click node_site_settings "https://github.com/zvekadev/smartour/blob/main/src/data/partners.ts"
click node_sanity_client "https://github.com/zvekadev/smartour/blob/main/src/lib/sanity.ts"
click node_studio_config "https://github.com/zvekadev/smartour/blob/main/studio/sanity.config.ts"
click node_schema_registry "https://github.com/zvekadev/smartour/blob/main/studio/schemaTypes/index.ts"
click node_offer_schema "https://github.com/zvekadev/smartour/blob/main/studio/schemaTypes/documents/offer.ts"
click node_blog_schema "https://github.com/zvekadev/smartour/blob/main/studio/schemaTypes/documents/blogPost.ts"
click node_about_schema "https://github.com/zvekadev/smartour/blob/main/studio/schemaTypes/documents/aboutUs.ts"
click node_transport_schema "https://github.com/zvekadev/smartour/blob/main/studio/schemaTypes/documents/transportPage.ts"
click node_settings_schema "https://github.com/zvekadev/smartour/blob/main/studio/schemaTypes/documents/siteSettings.ts"
click node_taxonomy_schemas "https://github.com/zvekadev/smartour/tree/main/studio/schemaTypes/documents"
click node_localized_objects "https://github.com/zvekadev/smartour/tree/main/studio/schemaTypes/objects"
click node_ui_locales "https://github.com/zvekadev/smartour/blob/main/src/i18n/ui.ts"
click node_extra_categories "https://github.com/zvekadev/smartour/blob/main/src/data/categoriesExtra.ts"

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_offer_browse,node_offer_filter,node_offer_gallery,node_map,node_contact_form toneBlue
class node_blog_content,node_about_content,node_transport_content,node_site_settings,node_sanity_client,node_sanity toneAmber
class node_studio_config,node_schema_registry,node_offer_schema,node_blog_schema,node_about_schema,node_transport_schema,node_settings_schema,node_taxonomy_schemas,node_localized_objects toneMint
class node_ui_locales,node_extra_categories toneRose
class node_visitor,node_studio_editor toneIndigo
```

## Components

### Tourism site

- [Offer browsing](https://github.com/zvekadev/smartour/blob/main/src/lib/offers.ts): `src/lib/offers.ts`
- [Offer filters](https://github.com/zvekadev/smartour/blob/main/src/scripts/offersFilter.client.ts): `src/scripts/offersFilter.client.ts`
- [Offer gallery](https://github.com/zvekadev/smartour/blob/main/src/scripts/offerGallery.client.ts): `src/scripts/offerGallery.client.ts`
- [Offer map](https://github.com/zvekadev/smartour/blob/main/src/scripts/map.client.ts): `src/scripts/map.client.ts`
- [Contact form](https://github.com/zvekadev/smartour/blob/main/src/scripts/contactForm.client.ts): `src/scripts/contactForm.client.ts`

### Content access

- [Blog content](https://github.com/zvekadev/smartour/blob/main/src/data/blog/posts.ts): `src/data/blog/posts.ts`
- [About content](https://github.com/zvekadev/smartour/blob/main/src/data/aboutUs.ts): `src/data/aboutUs.ts`
- [Transport content](https://github.com/zvekadev/smartour/blob/main/src/lib/transport.ts): `src/lib/transport.ts`
- [Site settings data](https://github.com/zvekadev/smartour/blob/main/src/data/partners.ts): `src/data/partners.ts`
- [Sanity client](https://github.com/zvekadev/smartour/blob/main/src/lib/sanity.ts): `src/lib/sanity.ts`
- **Sanity CMS**

### Sanity Studio

- [Studio configuration](https://github.com/zvekadev/smartour/blob/main/studio/sanity.config.ts): `studio/sanity.config.ts`
- [Schema registry](https://github.com/zvekadev/smartour/blob/main/studio/schemaTypes/index.ts): `studio/schemaTypes/index.ts`
- [Offer schema](https://github.com/zvekadev/smartour/blob/main/studio/schemaTypes/documents/offer.ts): `studio/schemaTypes/documents/offer.ts`
- [Blog schema](https://github.com/zvekadev/smartour/blob/main/studio/schemaTypes/documents/blogPost.ts): `studio/schemaTypes/documents/blogPost.ts`
- [About schema](https://github.com/zvekadev/smartour/blob/main/studio/schemaTypes/documents/aboutUs.ts): `studio/schemaTypes/documents/aboutUs.ts`
- [Transport schema](https://github.com/zvekadev/smartour/blob/main/studio/schemaTypes/documents/transportPage.ts): `studio/schemaTypes/documents/transportPage.ts`
- [Settings schema](https://github.com/zvekadev/smartour/blob/main/studio/schemaTypes/documents/siteSettings.ts): `studio/schemaTypes/documents/siteSettings.ts`
- [Location schemas](https://github.com/zvekadev/smartour/tree/main/studio/schemaTypes/documents): `studio/schemaTypes/documents`
- [Localized objects](https://github.com/zvekadev/smartour/tree/main/studio/schemaTypes/objects): `studio/schemaTypes/objects`

### Localization

- [UI translations](https://github.com/zvekadev/smartour/blob/main/src/i18n/ui.ts): `src/i18n/ui.ts`
- [Extra categories](https://github.com/zvekadev/smartour/blob/main/src/data/categoriesExtra.ts): `src/data/categoriesExtra.ts`

### Other components

- **Visitor**
- **Content editor**

## Connections

- Visitor → Offer browsing: browses offers
- Offer browsing → Sanity client: fetches offers (evidence: `src/lib/offers.ts`)
- Blog content → Sanity client: fetches posts (evidence: `src/data/blog/posts.ts`)
- About content → Sanity client: fetches content (evidence: `src/data/aboutUs.ts`)
- Transport content → Sanity client: fetches content (evidence: `src/lib/transport.ts`)
- Site settings data → Sanity client: fetches settings (evidence: `src/data/partners.ts`)
- Sanity client → Sanity CMS: queries (evidence: `src/lib/sanity.ts`)
- Content editor → Studio configuration: edits content
- Studio configuration → Schema registry: registers schemas (evidence: `studio/sanity.config.ts`)
- Schema registry → Offer schema: registers (evidence: `studio/schemaTypes/index.ts`)
- Schema registry → Blog schema: registers (evidence: `studio/schemaTypes/index.ts`)
- Schema registry → About schema: registers (evidence: `studio/schemaTypes/index.ts`)
- Schema registry → Transport schema: registers (evidence: `studio/schemaTypes/index.ts`)
- Schema registry → Settings schema: registers (evidence: `studio/schemaTypes/index.ts`)
- Schema registry → Location schemas: registers (evidence: `studio/schemaTypes/index.ts`)
- Schema registry → Localized objects: registers (evidence: `studio/schemaTypes/index.ts`)
