# statichunt/geeky-nextjs architecture

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

- Interactive diagram: https://gitdiagram.com/statichunt/geeky-nextjs
- Repository: https://github.com/statichunt/geeky-nextjs

## Overview

##### Main System Components

a) Client Layer
- Next.js frontend components
- Static and dynamic rendering paths
- Client-side routing system

b) Server Layer
- Next.js API routes
- Server-side rendering (SSR) functionality
- Static site generation (SSG) capabilities

c) Content Management Layer
- MDX content processing
- Content parsing system
- Taxonomy management

##### Key Relationships to Highlight

Create connections between components showing:

a) Data Flow
- Content flow from MDX files to rendered pages
- Static asset handling (images, styles)
- API interactions for features like the contact form

b) Build-time vs Runtime processes
- Static generation pipeline
- Dynamic rendering paths
- Client-side interactions

##### Specific Components

Frontend Components:
- Pages Layer
- Static Pages (About, Contact)
- Dynamic Pages (Posts, Categories)
- Special Pages (404, Search)

- Layout Components
- Base Layout
- Header/Footer
- Sidebar

- Utility Layer
- Hooks (useLoadMore, useOs, useWindow)
- Context (state management)

Content Processing:
- Content Pipeline
- MDX Parser
- Taxonomy Parser
- Content Parser

- Asset Management
- Image Optimization
- Style Processing (Tailwind/SCSS)

##### Important Subsystems to Detail

- MDX processing pipeline
- Page generation system
- Theme configuration
- Asset optimization pipeline

##### Technical Stack Indicators

Technology badges for:
- Next.js 13
- MDX
- Tailwind CSS
- SCSS
- Node.js

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        Pages["Pages Layer"]
        Layout["Layout Components"]
        UI["UI Components"]
        Hooks["Utility Hooks"]
        Short["Shortcodes"]
    end

    subgraph Server
        SSR["Server-Side Rendering"]
        SSG["Static Site Generation"]
        API["API Routes"]
    end

    subgraph ContentManagement
        MDX["MDX Parser"]
        Tax["Taxonomy Parser"]
        Cont["Content Parser"]
        JSON["JSON Generator"]
    end

    subgraph Assets
        Images["Image Management"]
        Styles["Style Processing"]
        Config["Configuration"]
    end

    %% Main Relationships
    ContentManagement --> SSG
    SSG --> Pages
    SSR --> Pages
    Pages --> Layout
    Layout --> UI
    UI --> Hooks
    Short --> Layout

    %% Asset Relationships
    Images --> UI
    Styles --> UI
    Config --> Layout

    %% Click Events
    click Pages "https://github.com/statichunt/geeky-nextjs/tree/main//pages"
    click Layout "https://github.com/statichunt/geeky-nextjs/tree/main//layouts"
    click UI "https://github.com/statichunt/geeky-nextjs/tree/main//layouts/components"
    click Hooks "https://github.com/statichunt/geeky-nextjs/tree/main//hooks"
    click Short "https://github.com/statichunt/geeky-nextjs/tree/main//layouts/shortcodes"
    click MDX "https://github.com/statichunt/geeky-nextjs/blob/main//lib/mdxParser.js"
    click Tax "https://github.com/statichunt/geeky-nextjs/blob/main//lib/taxonomyParser.js"
    click Cont "https://github.com/statichunt/geeky-nextjs/blob/main//lib/contentParser.js"
    click JSON "https://github.com/statichunt/geeky-nextjs/blob/main//lib/jsonGenerator.js"
    click Images "https://github.com/statichunt/geeky-nextjs/tree/main//public/images"
    click Styles "https://github.com/statichunt/geeky-nextjs/tree/main//styles"
    click Config "https://github.com/statichunt/geeky-nextjs/tree/main//config"

    %% Styling
    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef server fill:#2ecc71,stroke:#27ae60,color:white
    classDef content fill:#e74c3c,stroke:#c0392b,color:white
    classDef asset fill:#f1c40f,stroke:#f39c12,color:black

    class Pages,Layout,UI,Hooks,Short frontend
    class SSR,SSG,API server
    class MDX,Tax,Cont,JSON content
    class Images,Styles,Config asset

    %% Legend
    subgraph Legend
        Frontend["Frontend Components"]:::frontend
        Server["Server Components"]:::server
        Content["Content Processing"]:::content
        Asset["Asset Management"]:::asset
    end
```
