# lukaernestini/ordinacija-bozic-2 architecture

> Architecture diagram of the GitHub repository lukaernestini/ordinacija-bozic-2, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lukaernestini/ordinacija-bozic-2
- Repository: https://github.com/lukaernestini/ordinacija-bozic-2

## Overview

##### Main Components Identification

a) Client Layer:
- Next.js Frontend (App Router)
- Static Components (Navbar, Footer)
- Dynamic Components (Services List, Services Small)

b) Content Management Layer:
- Tina CMS Integration
- Content Structure (MDX files)

c) Routing Layer:
- Static Routes
- Dynamic Routes ([...slug])

d) Asset Management:
- Public Assets
- Hero Images

##### Component Relationships

a) Frontend Architecture:
**┌─ Next.js Application ─────────────────┐**

- ┌─ Pages ──────┐    ┌─ Components ─┐│
- layout.tsx   │    │ navbar.tsx   ││
- page.tsx     │    │ footer.tsx   ││
- [...slug].tsx│    │ services/    ││
- ┘    └─────────────┘ │

- ┘

b) Content Flow:
**┌─ Tina CMS ─────┐     ┌─ Content ────┐**
- config.ts      │ --> │ services/    │
- (Management)   │     │ location/    │
- ┘     │ global/      │
- ┘

##### Specific Implementation Details

- Blue rectangles: React/Next.js components
- Green rectangles: Content (MDX files)
- Yellow rectangles: Configuration files
- Purple diamonds: Dynamic routing points

##### Key Architectural Elements to Highlight

a) App Router Structure:
- Hierarchy of app/ directory
- Dynamic routing with [...slug]
- Client and server components

b) Content Management:
- Tina CMS integration
- Demonstrate content organization (MDX files)
- Global configuration flow

##### Technical Stack Indicators

- Next.js
- React
- TypeScript
- Tailwind CSS
- Tina CMS
- MDX

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        NF[Next.js Frontend]
        SC[Static Components]
        DC[Dynamic Components]
        
        NF --> SC
        NF --> DC
        
        subgraph StaticComp
            NAV[Navbar]
            FOOT[Footer]
        end
        
        subgraph DynamicComp
            SL[Services List]
            SS[Services Small]
        end
        
        SC --> NAV
        SC --> FOOT
        DC --> SL
        DC --> SS
    end
    
    subgraph CMS
        TCMS[Tina CMS]
        AP[Admin Panel]
        CONF[CMS Config]
        
        TCMS --> AP
        TCMS --> CONF
    end
    
    subgraph Content
        SERV[Services Content]
        LOC[Location Content]
        GLOB[Global Content]
        
        TCMS --> SERV
        TCMS --> LOC
        TCMS --> GLOB
    end
    
    subgraph Routing
        SR[Static Routes]
        DR[Dynamic Routes]
        
        NF --> SR
        NF --> DR
    end
    
    subgraph Assets
        HI[Hero Images]
        IC[Icons]
    end
    
    subgraph Config
        NC[Next.js Config]
        TC[TypeScript Config]
        TWC[Tailwind Config]
    end
    
    Content --> DC
    Assets --> SC
    Assets --> DC
    
    %% Click events for component mapping
    click NF "https://github.com/LukaErnestini/ordinacija-bozic-2/tree/main/app"
    click NAV "https://github.com/LukaErnestini/ordinacija-bozic-2/blob/main/components/navbar.tsx"
    click FOOT "https://github.com/LukaErnestini/ordinacija-bozic-2/blob/main/components/footer.tsx"
    click SL "https://github.com/LukaErnestini/ordinacija-bozic-2/blob/main/components/services/services-list.tsx"
    click SS "https://github.com/LukaErnestini/ordinacija-bozic-2/blob/main/components/services/services-small.tsx"
    click CONF "https://github.com/LukaErnestini/ordinacija-bozic-2/blob/main/tina/config.ts"
    click AP "https://github.com/LukaErnestini/ordinacija-bozic-2/tree/main/public/admin"
    click SERV "https://github.com/LukaErnestini/ordinacija-bozic-2/tree/main/content/services"
    click LOC "https://github.com/LukaErnestini/ordinacija-bozic-2/tree/main/content/location"
    click GLOB "https://github.com/LukaErnestini/ordinacija-bozic-2/tree/main/content/global"
    click SR "https://github.com/LukaErnestini/ordinacija-bozic-2/blob/main/app/page.tsx"
    click DR "https://github.com/LukaErnestini/ordinacija-bozic-2/blob/main/app/storitve/[...slug]/page.tsx"
    click HI "https://github.com/LukaErnestini/ordinacija-bozic-2/tree/main/public/heroImages"
    click IC "https://github.com/LukaErnestini/ordinacija-bozic-2/tree/main/public/icons"
    click NC "https://github.com/LukaErnestini/ordinacija-bozic-2/blob/main/next.config.ts"
    click TC "https://github.com/LukaErnestini/ordinacija-bozic-2/blob/main/tsconfig.json"
    click TWC "https://github.com/LukaErnestini/ordinacija-bozic-2/blob/main/tailwind.config.ts"
    
    %% Styling
    classDef default fill:#f9f9f9,stroke:#333,stroke-width:2px
    classDef cms fill:#e1f7d5,stroke:#333
    classDef content fill:#ffebcc,stroke:#333
    classDef routing fill:#f2d9e6,stroke:#333
    classDef config fill:#dae8fc,stroke:#333
    
    class TCMS,AP,CONF cms
    class SERV,LOC,GLOB content
    class SR,DR routing
    class NC,TC,TWC config
```
