# namnguyenthanhwork/docusaurus-tailwind-shadcn-template architecture

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

- Interactive diagram: https://gitdiagram.com/namnguyenthanhwork/docusaurus-tailwind-shadcn-template
- Repository: https://github.com/namnguyenthanhwork/docusaurus-tailwind-shadcn-template

## Overview

##### Main Components Identification

The system should be represented with these primary components:

a) Frontend Application Layer
- Documentation System (Docusaurus V3)
- UI Component Layer (Shadcn/UI)
- Styling System (TailwindCSS)
- Search Engine (@easyops-cn/docusaurus-search-local)

b) Content Management Layer
- Documentation Content (/docs)
- Blog Content (/blog)
- Static Assets (/static)

**┌─ Browser/Client Interface ─┐**

- ▼
**┌─ Docusaurus Application Layer ─┐**

- UI Layer
- Shadcn/UI Components
- Custom Components
- TailwindCSS Styling

- Routing & Navigation
- Documentation Routes
- Blog Routes
- Custom Pages

- Content Management
- Markdown Processor
- MDX Processor
- Static Assets

- Search Infrastructure
- Local Search Index

##### Technical Details

Annotations for:
- Dark/Light Mode Toggle System
- MDX Processing Pipeline
- TailwindCSS Configuration
- Search Index Generation

##### Integration Points

Integration between:
- Docusaurus and Shadcn/UI
- TailwindCSS and Theme System
- Content and Search Index
- Static Assets and Build Pipeline

##### Deployment Flow

A separate section showing:
- Build Process
- Vercel Deployment
- Static Site Generation
- Asset Optimization

Key Emphasis Points:
- How TailwindCSS integrates with both Docusaurus and Shadcn/UI
- Content pipeline from markdown/MDX to rendered pages
- Demonstrate the search functionality implementation
- Theme customization system
- Plugin architecture and its extension points

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        Browser["Browser/Client Interface"]
    end

    subgraph DocusaurusLayer["Docusaurus Application Layer"]
        Config["Docusaurus Config"]:::config
        TailwindConfig["TailwindCSS Config"]:::config
        ShadcnConfig["Shadcn/UI Config"]:::config
    end

    subgraph UILayer["UI Component Layer"]
        ShadcnUI["Shadcn/UI Components"]:::ui
        CustomComponents["Custom Components"]:::ui
        HomepageComponents["Homepage Components"]:::ui
        LatestNews["Latest News Component"]:::ui
        Utils["Utility Functions"]:::utils
    end

    subgraph ThemeLayer["Theme Customization"]
        BlogTheme["Blog Theme Components"]:::theme
        BlogLayout["Blog Layout"]:::theme
        BlogSidebar["Blog Sidebar"]:::theme
        DocBreadcrumbs["Document Breadcrumbs"]:::theme
        Footer["Footer"]:::theme
        CustomCSS["Custom Styling"]:::theme
    end

    subgraph ContentLayer["Content Management"]
        DocsContent["Documentation Content"]:::content
        BlogContent["Blog Content"]:::content
        StaticAssets["Static Assets"]:::content
        BlogAuthors["Blog Authors Config"]:::content
        BlogTags["Blog Tags Config"]:::content
    end

    subgraph PluginLayer["Plugin Architecture"]
        BlogPlugin["Blog Plugin"]:::plugin
        TailwindPlugin["Tailwind Plugin"]:::plugin
    end

    subgraph SearchSystem["Search Infrastructure"]
        SearchIndex["Local Search Index"]:::search
    end

    Browser --> Config
    Config --> UILayer
    Config --> ThemeLayer
    Config --> ContentLayer

    TailwindConfig --> CustomCSS
    TailwindConfig --> UILayer
    ShadcnConfig --> ShadcnUI

    ContentLayer --> SearchIndex
    ContentLayer --> BlogPlugin
    TailwindConfig --> TailwindPlugin

    %% Click Events
    click Config "https://github.com/namnguyenthanhwork/docusaurus-tailwind-shadcn-template/blob/main/docusaurus.config.js"
    click TailwindConfig "https://github.com/namnguyenthanhwork/docusaurus-tailwind-shadcn-template/blob/main/tailwind.config.js"
    click ShadcnConfig "https://github.com/namnguyenthanhwork/docusaurus-tailwind-shadcn-template/blob/main/components.json"
    click ShadcnUI "https://github.com/namnguyenthanhwork/docusaurus-tailwind-shadcn-template/tree/main/src/components/ui"
    click HomepageComponents "https://github.com/namnguyenthanhwork/docusaurus-tailwind-shadcn-template/tree/main/src/components/Homepage"
    click LatestNews "https://github.com/namnguyenthanhwork/docusaurus-tailwind-shadcn-template/tree/main/src/components/LatestNews"
    click Utils "https://github.com/namnguyenthanhwork/docusaurus-tailwind-shadcn-template/blob/main/src/lib/utils.ts"
    click BlogTheme "https://github.com/namnguyenthanhwork/docusaurus-tailwind-shadcn-template/tree/main/src/theme/Blog"
    click BlogLayout "https://github.com/namnguyenthanhwork/docusaurus-tailwind-shadcn-template/tree/main/src/theme/BlogLayout"
    click BlogSidebar "https://github.com/namnguyenthanhwork/docusaurus-tailwind-shadcn-template/tree/main/src/theme/BlogSidebar"
    click DocBreadcrumbs "https://github.com/namnguyenthanhwork/docusaurus-tailwind-shadcn-template/tree/main/src/theme/DocBreadcrumbs"
    click Footer "https://github.com/namnguyenthanhwork/docusaurus-tailwind-shadcn-template/tree/main/src/theme/Footer"
    click CustomCSS "https://github.com/namnguyenthanhwork/docusaurus-tailwind-shadcn-template/blob/main/src/css/custom.css"
    click BlogPlugin "https://github.com/namnguyenthanhwork/docusaurus-tailwind-shadcn-template/blob/main/src/plugins/blog-plugin.js"
    click TailwindPlugin "https://github.com/namnguyenthanhwork/docusaurus-tailwind-shadcn-template/blob/main/src/plugins/tailwind-config.js"
    click DocsContent "https://github.com/namnguyenthanhwork/docusaurus-tailwind-shadcn-template/tree/main/docs"
    click BlogContent "https://github.com/namnguyenthanhwork/docusaurus-tailwind-shadcn-template/tree/main/blog"
    click StaticAssets "https://github.com/namnguyenthanhwork/docusaurus-tailwind-shadcn-template/tree/main/static"
    click BlogAuthors "https://github.com/namnguyenthanhwork/docusaurus-tailwind-shadcn-template/blob/main/blog/authors.yml"
    click BlogTags "https://github.com/namnguyenthanhwork/docusaurus-tailwind-shadcn-template/blob/main/blog/tags.yml"

    %% Styling
    classDef config fill:#1E40AF,color:white
    classDef ui fill:#059669,color:white
    classDef theme fill:#6D28D9,color:white
    classDef content fill:#D97706,color:white
    classDef plugin fill:#DC2626,color:white
    classDef search fill:#7C3AED,color:white
    classDef utils fill:#475569,color:white

    %% Legend
    subgraph Legend
        L1["Configuration"]:::config
        L2["UI Components"]:::ui
        L3["Theme System"]:::theme
        L4["Content"]:::content
        L5["Plugins"]:::plugin
        L6["Search"]:::search
        L7["Utilities"]:::utils
    end
```
