# ar-rashik/bblock-site architecture

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

- Interactive diagram: https://gitdiagram.com/ar-rashik/bblock-site
- Repository: https://github.com/ar-rashik/bblock-site

## Overview

##### Main Architecture Components

a) Client-Side Layer:
- Next.js App Router (src/app/*)
- Components Layer (src/components/*)
- UI Components (src/components/ui/*)
- Shared Components (src/components/shared/*)
- Section Components (src/components/sections/*)

b) Core Infrastructure:
- Configuration Layer (src/config/*)
- Utilities Layer (src/lib/*)
- Type Definitions (src/types/*)
- Static Assets (public/*)

##### Component Relationships

**[Client Browser]**
- ↕
**[Next.js App Router]**
- ↕
**[Page Components] ←→ [Section Components]**
- ↕                     ↕
**[Shared Components] ←→ [UI Components]**
- ↕
**[Utilities/Config/Types]**

##### Specific Implementation Details

- Blue Rectangles: Page components (src/app/*)
- Green Rectangles: Reusable UI components (src/components/ui/*)
- Yellow Rectangles: Section components (src/components/sections/*)
- Purple Rectangles: Shared components (src/components/shared/*)
- Gray Rectangles: Configuration and utilities (src/lib/*, src/config/*)

##### Key Features to Highlight

- The app router structure showing main routes (/blog, /privacy-policy)
- Component hierarchy and reusability
- Integration with shadcn/ui components
- Static asset management (public/images/*)
- Utility functions and configurations

##### Technical Stack Indicators

Integration points for:
- TypeScript
- Tailwind CSS
- shadcn/ui components
- Environment variables
- Next.js configuration

##### Data Flow

- User interactions → Components
- Component → Component communications
- Static asset loading
- Configuration injection

This will provide a clear understanding of how the different parts of the application work together while maintaining the modern Next.js 14+ architecture patterns.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Browser
        Client[Client Browser]
    end

    subgraph AppLayer
        Router["Next.js App Router"]:::router
        Pages["Page Components"]:::pages
    end

    subgraph ComponentLayers
        direction TB
        Sections["Section Components"]:::sections
        SharedComp["Shared Components"]:::shared
        UIComp["UI Components"]:::ui
    end

    subgraph Infrastructure
        direction TB
        Config["Configuration"]:::config
        Utils["Utilities"]:::utils
        Types["Type Definitions"]:::types
        Assets["Static Assets"]:::assets
        Styles["Global Styles"]:::styles
    end

    subgraph SharedComponents
        direction TB
        Nav["Navigation"]:::shared
        Footer["Footer"]:::shared
        Theme["Theme Provider"]:::shared
    end

    subgraph SectionComponents
        direction TB
        Blog["Blog Section"]:::sections
        Feature["Feature Section"]:::sections
        Hero["Hero Section"]:::sections
        Contact["Contact Section"]:::sections
    end

    Client <--> Router
    Router <--> Pages
    Pages <--> Sections
    Pages <--> SharedComp
    SharedComp <--> UIComp
    Sections <--> UIComp
    Pages --> Infrastructure
    SharedComp --> Infrastructure
    Sections --> Infrastructure

    %% Component Relationships
    SharedComp --- SharedComponents
    Sections --- SectionComponents

    %% Click Events
    click Router "https://github.com/AR-Rashik/bblock-site/tree/main/src/app/*"
    click UIComp "https://github.com/AR-Rashik/bblock-site/tree/main/src/components/ui/*"
    click SharedComp "https://github.com/AR-Rashik/bblock-site/tree/main/src/components/shared/*"
    click Sections "https://github.com/AR-Rashik/bblock-site/tree/main/src/components/sections/*"
    click Config "https://github.com/AR-Rashik/bblock-site/blob/main/src/config/site.ts"
    click Utils "https://github.com/AR-Rashik/bblock-site/tree/main/src/lib/*"
    click Types "https://github.com/AR-Rashik/bblock-site/blob/main/src/types/index.d.ts"
    click Assets "https://github.com/AR-Rashik/bblock-site/tree/main/public/images/*"
    click Theme "https://github.com/AR-Rashik/bblock-site/blob/main/src/components/theme-provider.tsx"
    click Nav "https://github.com/AR-Rashik/bblock-site/blob/main/src/components/shared/navbar/Navbar.tsx"
    click Footer "https://github.com/AR-Rashik/bblock-site/blob/main/src/components/shared/footer/Footer.tsx"
    click Blog "https://github.com/AR-Rashik/bblock-site/tree/main/src/components/sections/Blog/*"
    click Feature "https://github.com/AR-Rashik/bblock-site/tree/main/src/components/sections/Feature/*"
    click Hero "https://github.com/AR-Rashik/bblock-site/tree/main/src/components/sections/Hero/*"
    click Contact "https://github.com/AR-Rashik/bblock-site/blob/main/src/components/sections/Contact/Contact.tsx"
    click Styles "https://github.com/AR-Rashik/bblock-site/blob/main/src/styles/globals.css"

    %% Styling
    classDef router fill:#2563eb,color:white
    classDef pages fill:#1d4ed8,color:white
    classDef sections fill:#eab308,color:black
    classDef shared fill:#9333ea,color:white
    classDef ui fill:#22c55e,color:black
    classDef config fill:#64748b,color:white
    classDef utils fill:#64748b,color:white
    classDef types fill:#64748b,color:white
    classDef assets fill:#64748b,color:white
    classDef styles fill:#64748b,color:white
```
