# varunnkrishna/veblabs_working architecture

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

- Interactive diagram: https://gitdiagram.com/varunnkrishna/veblabs_working
- Repository: https://github.com/varunnkrishna/veblabs_working

## Overview

##### Main System Components

a) Frontend Layer
- Static Site Generation (Astro.js)
- Component Library
- Internationalization System
- Theme System (Light/Dark mode)

b) Backend Services
- Supabase Integration
- API Functions (Contact/Email)
- Content Management System

##### Detailed Component Breakdown

Frontend Architecture:
**┌─ User Interface Layer ─────────────────────┐**
- Pages (src/pages/)                      │
- Components (src/components/)            │
- Layouts (src/layouts/)                  │
- ┘
- ↕
**┌─ Core Services Layer ────────────────────────┐**
- i18n System (src/i18n/)                  │
- Content Management (src/content/)         │
- Theme Management                          │
- Asset Management (public/)                │
- ┘
- ↕
**┌─ API Layer ──────────────────────────────────┐**
- Contact API (functions/contact.js)        │
- Supabase Integration (src/lib/supabase.ts)│
- ┘

##### Key Relationships to Highlight

a) Content Flow:
- Content files (MD) → Content Config → Pages
- i18n translations → Component rendering
- Static assets → Public delivery

b) Data Flow:
- Contact Form → API Functions → Supabase
- Content → Static Generation → Deployed Site

##### Technical Stack Indicators

- Astro.js as the main framework
- Tailwind CSS for styling
- Supabase for backend services
- Markdown for content management

##### Deployment Architecture

Build process:
**Content Sources → Astro Build → Static Assets → CDN Delivery**

- Page components
- Shared components
- Content management
- API services
- Internationalization system
- Theme system

Remember to:
- Notes for key architectural decisions
- Relationship between static and dynamic content
- Separation between build-time and runtime processes

This system appears to be a modern Jamstack application, so emphasize the static generation aspects while also showing how it interfaces with dynamic services like the contact form and Supabase integration.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "User Interface Layer"
        Pages["Pages"]
        Components["Components"]
        Layouts["Layouts"]
        ThemeSystem["Theme System"]
    end

    subgraph "Core Services Layer"
        I18N["i18n System"]
        ContentMgmt["Content Management"]
        AssetMgmt["Asset Management"]
    end

    subgraph "API Layer"
        ContactAPI["Contact API"]
        EmailAPI["Email API"]
        SupabaseInt["Supabase Integration"]
        DBMigrations["Database Migrations"]
    end

    subgraph "Content Sources"
        BlogPosts["Blog Posts"]
        Projects["Projects"]
        Testimonials["Testimonials"]
        Translations["Translations"]
    end

    subgraph "Core Components"
        ContactForm["Contact Form"]
        Navigation["Navigation"]
        Footer["Footer"]
        BlogComponents["Blog Components"]
    end

    Pages --> Components
    Components --> Layouts
    ThemeSystem --> Components
    I18N --> Pages
    ContentMgmt --> Pages
    AssetMgmt --> Pages
    ContactForm --> ContactAPI
    ContactAPI --> SupabaseInt
    EmailAPI --> SupabaseInt
    BlogPosts --> ContentMgmt
    Projects --> ContentMgmt
    Testimonials --> ContentMgmt
    Translations --> I18N

    %% Click events for component mapping
    click Pages "https://github.com/varunnkrishna/veblabs_working/tree/main/src/pages/[lang]/"
    click Components "https://github.com/varunnkrishna/veblabs_working/tree/main/src/components/"
    click Layouts "https://github.com/varunnkrishna/veblabs_working/tree/main/src/layouts/"
    click ThemeSystem "https://github.com/varunnkrishna/veblabs_working/blob/main/src/components/ThemeToggle.astro"
    click I18N "https://github.com/varunnkrishna/veblabs_working/tree/main/src/i18n/"
    click Translations "https://github.com/varunnkrishna/veblabs_working/tree/main/src/i18n/translations/"
    click ContentMgmt "https://github.com/varunnkrishna/veblabs_working/blob/main/src/content/config.ts"
    click BlogPosts "https://github.com/varunnkrishna/veblabs_working/tree/main/src/content/posts/"
    click Projects "https://github.com/varunnkrishna/veblabs_working/tree/main/src/content/projects/"
    click Testimonials "https://github.com/varunnkrishna/veblabs_working/tree/main/src/content/testimonials/"
    click SupabaseInt "https://github.com/varunnkrishna/veblabs_working/blob/main/src/lib/supabase.ts"
    click ContactAPI "https://github.com/varunnkrishna/veblabs_working/blob/main/functions/contact.js"
    click EmailAPI "https://github.com/varunnkrishna/veblabs_working/blob/main/src/pages/api/send.ts"
    click DBMigrations "https://github.com/varunnkrishna/veblabs_working/tree/main/supabase/migrations/"
    click AssetMgmt "https://github.com/varunnkrishna/veblabs_working/tree/main/public/"
    click ContactForm "https://github.com/varunnkrishna/veblabs_working/blob/main/src/components/ContactForm.astro"
    click Navigation "https://github.com/varunnkrishna/veblabs_working/blob/main/src/components/Nav.astro"
    click Footer "https://github.com/varunnkrishna/veblabs_working/blob/main/src/components/Footer.astro"
    click BlogComponents "https://github.com/varunnkrishna/veblabs_working/blob/main/src/components/BlogCard.astro"

    %% Styling
    classDef frontend fill:#3b82f6,color:white
    classDef content fill:#22c55e,color:white
    classDef api fill:#f97316,color:white
    classDef infra fill:#a855f7,color:white
    classDef i18n fill:#eab308,color:white

    class Pages,Components,Layouts,ThemeSystem frontend
    class ContentMgmt,BlogPosts,Projects,Testimonials content
    class ContactAPI,EmailAPI,SupabaseInt,DBMigrations api
    class AssetMgmt infra
    class I18N,Translations i18n
    class ContactForm,Navigation,Footer,BlogComponents frontend
```
