# 3dyuval/taramti architecture

> Architecture diagram of the GitHub repository 3dyuval/taramti, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-02-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/3dyuval/taramti
- Repository: https://github.com/3dyuval/taramti

## Overview

##### Main Components

A. Frontend Layer:
- Vue.js Application (indicated by .vue files)
- Components Structure:
- Layout Component
- Component
- Search Components
- Opening Hours Components
- Store Management (Pinia/stores folder)
- Internationalization System (i18n folder)
- Asset Management

B. Server Layer:
- Node.js Server (server directory)
- API Handlers (madaRequest.ts)
- Storage System (storage.ts)
- Database Integration (LevelDB - indicated by db files in assets/api/db)

C. External Services:
- Maps Integration (indicated by map-styles-silver.json)
- API Services (suggested by madaRequest.ts)

**[Client Layer]**
- ↑↓
**[Server Layer]**
- ↑↓
**[Data Layer]**
- ↑↓
**[External Services]**

##### Key Relationships to Highlight

- Client-Server Communication:
- Page routing (indicated by .page.route.ts)
- Server-side rendering (indicated by .page.server.ts files)
- Client-side hydration (_default.page.client.ts)

- Data Flow:
- API requests handling
- Database operations
- Data integration

##### Technical Stack Indicators

- Frontend: Vue.js
- Build Tool: Vite (vite.config.ts)
- Database: LevelDB
- TypeScript Implementation (numerous .ts files)

##### Additional Elements

- Error Handling Flow (Error.vue and error.json)
- Loading States (Loading.vue and loading.json)
- Geographic Features (cities.json)
- Browser Configuration (browserconfig.xml)

This system appears to be a modern full-stack application with a focus on location-based services and multilingual support, so ensure these aspects are prominently featured in the architectural representation.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        FE[Frontend Application]
        LC[Layout Component]:::component
        MC[Map Component]:::component
        SC[Search Component]:::component
        OH[Opening Hours Components]:::component
        SM[Store Management]:::store
        I18N[Internationalization]:::i18n
        ERR[Error Handling]:::component
        LOAD[Loading States]:::component
    end

    subgraph Server
        NS[Node.js Server]:::server
        API[API Handlers]:::server
        SS[Storage System]:::server
    end

    subgraph Data
        DB[(Database - LevelDB)]:::database
        GEO[Geographic Data]:::data
        BC[Browser Config]:::config
    end

    subgraph External
        MAPS[Maps Service]:::external
        EXT_API[External APIs]:::external
    end

    %% Client Layer Relationships
    FE --> LC
    FE --> MC
    FE --> SC
    FE --> OH
    FE --> SM
    FE --> I18N
    FE --> ERR
    FE --> LOAD

    %% Server Layer Relationships
    FE <--> NS
    NS <--> API
    NS <--> SS

    %% Data Layer Relationships
    SS <--> DB
    API --> GEO
    FE --> BC

    %% External Service Relationships
    MC <--> MAPS
    API <--> EXT_API

    %% Click Events
    click LC "https://github.com/3dyuval/taramti/blob/main/src/components/Layout.vue"
    click MC "https://github.com/3dyuval/taramti/blob/main/src/components/Map.vue"
    click SC "https://github.com/3dyuval/taramti/blob/main/src/components/SearchCard.vue"
    click OH "https://github.com/3dyuval/taramti/blob/main/src/components/OpeningHoursChip.vue"
    click SM "https://github.com/3dyuval/taramti/blob/main/src/stores/useHeart.ts"
    click I18N "https://github.com/3dyuval/taramti/tree/main/src/i18n"
    click NS "https://github.com/3dyuval/taramti/blob/main/server/index.ts"
    click API "https://github.com/3dyuval/taramti/blob/main/server/madaRequest.ts"
    click SS "https://github.com/3dyuval/taramti/blob/main/server/storage.ts"
    click DB "https://github.com/3dyuval/taramti/tree/main/src/assets/api/db"
    click MAPS "https://github.com/3dyuval/taramti/blob/main/src/assets/map-styles-silver.json"
    click ERR "https://github.com/3dyuval/taramti/blob/main/src/components/Error.vue"
    click LOAD "https://github.com/3dyuval/taramti/blob/main/src/components/Loading.vue"
    click GEO "https://github.com/3dyuval/taramti/blob/main/src/assets/cities.json"
    click BC "https://github.com/3dyuval/taramti/blob/main/public/browserconfig.xml"

    %% Styling
    classDef component fill:#2196F3,stroke:#1565C0,color:white
    classDef store fill:#4CAF50,stroke:#2E7D32,color:white
    classDef i18n fill:#9C27B0,stroke:#6A1B9A,color:white
    classDef server fill:#FF9800,stroke:#EF6C00,color:white
    classDef database fill:#FFC107,stroke:#FFA000,color:black
    classDef data fill:#00BCD4,stroke:#0097A7,color:white
    classDef config fill:#607D8B,stroke:#455A64,color:white
    classDef external fill:#9E9E9E,stroke:#616161,color:white
```
