# dan-duran/learn-bash architecture

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

- Interactive diagram: https://gitdiagram.com/dan-duran/learn-bash
- Repository: https://github.com/dan-duran/learn-bash

## Overview

##### Main Components

a. Frontend Layer:
- Next.js Application (App Router)
- UI Components
- Content Management
- Client-side Features

b. Content Layer:
- MDX Documentation
- Static Assets
- Educational Resources

c. Infrastructure Layer:
- Vercel Deployment
- Analytics
- Build System

##### Detailed Component Breakdown

Frontend Architecture:

- Client Browser     |

- ↓

- Next.js App Router  |

- ↙            ↘

- Pages  |  | Components|

- ↓            ↓

- Content Rendering   |

- ↓

- MDX Processing     |

##### Key Relationships to Highlight

a. Content Flow:
- How MDX content flows through the Next.js system
- Demonstrate the relationship between routes and content
- How UI components integrate with content

b. Component Architecture:
- Hierarchy of UI components (base components → composite components)
- Theme system and its integration
- Demonstrate the routing system

##### Technical Stack Elements

- Presentation    |

- Tailwind CSS    |
- Shadcn/ui       |
- Custom UI       |

- ↓

- Core Framework  |

- Next.js 18+     |
- React           |
- TypeScript      |

- ↓

- Build/Deploy    |

- Vercel          |
- Analytics       |

##### Implementation Details

- How the app directory structure maps to routes
- Content organization in the /contents/docs directory
- Component relationships in the /components directory
- Integration of UI utilities and hooks

**User Request → App Router → Page Component → MDX Content → UI Rendering**
- ↓
- API Routes (if any)
- ↓
- Static Content

##### Development Tooling

A section showing:
- ESLint integration
- TypeScript type checking
- Prettier formatting
- Build pipeline

Remember to:
- Use consistent styling and notation
- Version information
- Document integration points
- Error handling flows

## Diagram (Mermaid)

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

    subgraph NextApp["Next.js Application"]
        AppRouter["App Router"]:::core
        click AppRouter "https://github.com/Dan-Duran/learn-bash/tree/main/app"
        
        subgraph Frontend["Frontend Components"]
            direction TB
            UI["UI Components"]:::ui
            click UI "https://github.com/Dan-Duran/learn-bash/tree/main/components/ui"
            MagicUI["Custom UI"]:::ui
            click MagicUI "https://github.com/Dan-Duran/learn-bash/tree/main/components/magicui"
            MDComp["Markdown Components"]:::ui
            click MDComp "https://github.com/Dan-Duran/learn-bash/tree/main/components/markdown"
            
            Navigation["Navigation System"]
            NavBar["Navigation Bar"]:::ui
            click NavBar "https://github.com/Dan-Duran/learn-bash/blob/main/components/navbar.tsx"
            LeftBar["Left Sidebar"]:::ui
            click LeftBar "https://github.com/Dan-Duran/learn-bash/blob/main/components/leftbar.tsx"
            DocsMenu["Docs Menu"]:::ui
            click DocsMenu "https://github.com/Dan-Duran/learn-bash/blob/main/components/docs-menu.tsx"
            
            Search["Search System"]:::ui
            click Search "https://github.com/Dan-Duran/learn-bash/blob/main/components/search.tsx"
            
            Theme["Theme Provider"]:::ui
            click Theme "https://github.com/Dan-Duran/learn-bash/blob/main/components/contexts/theme-provider.tsx"
        end
        
        subgraph Content["Content Management"]
            MDX["MDX Documentation"]:::content
            click MDX "https://github.com/Dan-Duran/learn-bash/tree/main/contents/docs"
            Assets["Static Assets"]:::content
            click Assets "https://github.com/Dan-Duran/learn-bash/tree/main/public"
            DocLayout["Documentation Layout"]:::content
            click DocLayout "https://github.com/Dan-Duran/learn-bash/blob/main/app/docs/layout.tsx"
            ContentRender["Content Rendering"]:::content
            click ContentRender "https://github.com/Dan-Duran/learn-bash/blob/main/app/docs/[[...slug]]/page.tsx"
            RouteConfig["Documentation Structure"]:::content
            click RouteConfig "https://github.com/Dan-Duran/learn-bash/blob/main/lib/routes-config.ts"
        end
        
        subgraph Core["Core Systems"]
            Utils["Core Utilities"]:::core
            click Utils "https://github.com/Dan-Duran/learn-bash/tree/main/lib"
            Styles["Styling System"]:::core
            click Styles "https://github.com/Dan-Duran/learn-bash/blob/main/styles/globals.css"
        end
        
        subgraph Build["Build System"]
            NextConfig["Next.js Config"]:::build
            click NextConfig "https://github.com/Dan-Duran/learn-bash/blob/main/next.config.mjs"
            TailwindConfig["Tailwind Config"]:::build
            click TailwindConfig "https://github.com/Dan-Duran/learn-bash/blob/main/tailwind.config.ts"
        end
    end
    
    subgraph Infrastructure["Infrastructure"]
        Vercel["Vercel Deployment"]:::infra
        Analytics["Analytics"]:::infra
    end
    
    %% Relationships
    Browser --> AppRouter
    AppRouter --> Frontend
    AppRouter --> Content
    Frontend --> Content
    Content --> Core
    Core --> Build
    Build --> Infrastructure
    
    Navigation --> NavBar & LeftBar & DocsMenu
    
    %% Styling
    classDef core fill:#2563eb,color:white
    classDef ui fill:#f97316,color:white
    classDef content fill:#22c55e,color:white
    classDef build fill:#a855f7,color:white
    classDef infra fill:#6366f1,color:white
    
    %% Legend
    subgraph Legend
        CoreLegend["Core Components"]:::core
        UILegend["UI Components"]:::ui
        ContentLegend["Content Components"]:::content
        BuildLegend["Build Components"]:::build
        InfraLegend["Infrastructure"]:::infra
    end
```
