# nibhapr/unv architecture

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

- Interactive diagram: https://gitdiagram.com/nibhapr/unv
- Repository: https://github.com/nibhapr/unv

## Overview

##### Main System Components

a) Frontend Layer
- Static Site Generation (Astro)
- Component Architecture
- Asset Management
- Routing System

b) Content Management
- Markdown Content
- Media Assets
- Configuration Management

c) Build System
- Static Site Generation Pipeline
- Asset Optimization
- Development Server

##### Detailed Component Breakdown

Frontend Architecture:
- Pages Layer
- Static Routes (src/pages/*)
- Dynamic Routes ([slug].astro)
- Component Layer
- UI Components
- Layout Components
- Widget Components
- Content Layer
- Blog Posts
- Product Categories
- Features
- Asset Management
- Images
- Styles
- Scripts

##### Key Relationships to Highlight

- How pages consume components
- Content flow from markdown to pages
- Static asset delivery
- Build process flow

##### Implementation Details

a) Core Framework
- Astro Runtime
- React Components (*.tsx files)
- Astro Components (*.astro files)

b) Content Structure
- Blog System
- Product Categories
- Features/Testimonials

c) Build Pipeline
- Development Server
- Production Build
- Asset Optimization

##### Technical Stack Elements
- Astro Framework
- React (for interactive components)
- Tailwind CSS
- Markdown Processing
- TypeScript Support

##### Specific Project Elements

Specialized sections for:
- Category Management System
- Blog Post System
- Image Optimization Pipeline
- Internationalization Support (fr folder)

- High-level architecture (how the application fits together)
- Component relationships (how different parts interact)
- Content flow (how data moves through the system)
- Build/deployment process (how the site is generated)

Remember to:
- Use clear, consistent labeling
- Data flow directions
- Integration points
- Document build/deployment flow

This will create a comprehensive yet understandable representation of the project's architecture while maintaining the necessary level of detail for a principal software engineer to understand the system's complete structure and behavior.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Frontend Layer"
        Pages["Pages Layer"]
        CompLayer["Component Layer"]
        ContentLayer["Content Layer"]
        AssetMgmt["Asset Management"]
    end

    subgraph "Pages Layer"
        StaticRoutes["Static Routes"]:::routes
        DynamicRoutes["Dynamic Routes"]:::routes
    end

    subgraph "Component Layer"
        UIComps["UI Components"]:::component
        LayoutComps["Layout Components"]:::component
        WidgetComps["Widget Components"]:::component
    end

    subgraph "Content Layer"
        BlogPosts["Blog Posts"]:::content
        ProdCats["Product Categories"]:::content
        Features["Features"]:::content
        Testimonials["Testimonials"]:::content
    end

    subgraph "Asset Management"
        Images["Images"]:::asset
        Styles["Styles"]:::asset
        Scripts["Scripts"]:::asset
    end

    subgraph "Build System"
        AstroRuntime["Astro Runtime"]:::build
        DevServer["Development Server"]:::build
        ProdBuild["Production Build"]:::build
        AssetOpt["Asset Optimization"]:::build
    end

    subgraph "Technical Stack"
        Astro["Astro Framework"]:::tech
        React["React Components"]:::tech
        TailwindCSS["Tailwind CSS"]:::tech
        TypeScript["TypeScript"]:::tech
        MarkdownProc["Markdown Processing"]:::tech
    end

    subgraph "Specialized Systems"
        CategoryMgmt["Category Management"]:::system
        BlogSystem["Blog System"]:::system
        I18n["Internationalization"]:::system
        ConfigMgmt["Configuration Management"]:::system
        Utils["Utility Functions"]:::system
    end

    Pages --> CompLayer
    CompLayer --> ContentLayer
    ContentLayer --> AssetMgmt
    AssetMgmt --> BuildSystem

    StaticRoutes --> UIComps
    StaticRoutes --> LayoutComps
    DynamicRoutes --> WidgetComps

    BlogPosts --> BlogSystem
    ProdCats --> CategoryMgmt
    Features --> ConfigMgmt
    Testimonials --> ConfigMgmt

    %% Click events for component mapping
    click StaticRoutes "https://github.com/nibhapr/unv/tree/main/src/pages/"
    click CompLayer "https://github.com/nibhapr/unv/tree/main/src/components/"
    click UIComps "https://github.com/nibhapr/unv/tree/main/src/components/ui/"
    click WidgetComps "https://github.com/nibhapr/unv/tree/main/src/components/widgets/"
    click LayoutComps "https://github.com/nibhapr/unv/tree/main/src/layouts/"
    click ContentLayer "https://github.com/nibhapr/unv/tree/main/src/content/"
    click AssetMgmt "https://github.com/nibhapr/unv/tree/main/src/assets/"
    click BlogSystem "https://github.com/nibhapr/unv/tree/main/src/pages/blog/"
    click CategoryMgmt "https://github.com/nibhapr/unv/tree/main/src/pages/categories/"
    click I18n "https://github.com/nibhapr/unv/tree/main/src/data_files/fr/"
    click Styles "https://github.com/nibhapr/unv/blob/main/src/assets/styles/tailwind.css"
    click ConfigMgmt "https://github.com/nibhapr/unv/blob/main/src/config.yaml"
    click Features "https://github.com/nibhapr/unv/tree/main/src/content/feature/"
    click Testimonials "https://github.com/nibhapr/unv/tree/main/src/content/testimonials/"
    click Utils "https://github.com/nibhapr/unv/tree/main/src/utils/"
    click TypeScript "https://github.com/nibhapr/unv/blob/main/src/types.d.ts"

    %% Styling
    classDef routes fill:#3498db
    classDef component fill:#2ecc71
    classDef content fill:#e74c3c
    classDef asset fill:#f39c12
    classDef build fill:#9b59b6
    classDef tech fill:#1abc9c
    classDef system fill:#e67e22

    %% Legend
    subgraph Legend
        L1["Routes"]:::routes
        L2["Components"]:::component
        L3["Content"]:::content
        L4["Assets"]:::asset
        L5["Build"]:::build
        L6["Tech Stack"]:::tech
        L7["Systems"]:::system
    end
```
