# hakushun/dm_picture-in-picture architecture

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

- Interactive diagram: https://gitdiagram.com/hakushun/dm_picture-in-picture
- Repository: https://github.com/hakushun/dm_picture-in-picture

## Overview

##### Main System Components

a) Client-Side Layer
- Browser/User Interface
- Client-side Runtime (Next.js)

b) Application Layer
- Pages/Routes Structure
- Component Architecture
- Static Assets

c) Build/Development Infrastructure
- Next.js Build System
- Development Server

##### Component Architecture Breakdown

**Layout (app/layout.tsx)**
- Header Component
- Nav Component
- Page Content
- Article Component

##### Technical Stack Representation

Specific technology indicators for:
- Next.js Framework
- TypeScript (indicated by .tsx files)
- CSS Modules (*.module.css files)

##### Implementation Details to Highlight

- The App Router architecture (new Next.js 13+ feature)
- Component modularity (shown by the components directory structure)
- Style management (global.css vs CSS modules)
- Static asset handling (public directory)

##### Development Environment

A section showing:
- Development server
- Build process
- Development tools (ESLint, Prettier)

**🔷 Next.js Component**
**🔶 Static Asset**
**⚙️ Configuration**
**➡️ Data Flow**
**⋯> Development-time Relationship**

- The App Router architecture as the central organizing principle
- Component relationships and hierarchy
- Clear separation of concerns between components, styles, and configuration
- Build and development workflow

## Diagram (Mermaid)

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

    subgraph "Component Layer"
        Layout["Layout Container"]:::component
        MainPage["Main Page"]:::component
        Header["Header Component"]:::component
        Nav["Navigation Component"]:::component
        Article["Article Component"]:::component
    end

    subgraph "Styles Layer"
        GlobalCSS["Global Styles"]:::styles
        ResetCSS["CSS Reset"]:::styles
        ComponentStyles["Component-Specific Styles"]:::styles
    end

    subgraph "Framework Layer"
        NextRuntime["Next.js Runtime"]:::framework
        AppRouter["App Router"]:::framework
    end

    subgraph "Build/Configuration Layer"
        NextConfig["Next.js Config"]:::config
        TSConfig["TypeScript Config"]:::config
        DevTools["Development Tools"]:::config
        StaticAssets["Static Assets"]:::assets
    end

    %% Relationships
    Browser --> NextRuntime
    NextRuntime --> AppRouter
    AppRouter --> Layout
    Layout --> Header
    Layout --> Nav
    Layout --> MainPage
    MainPage --> Article

    %% Style Relationships
    GlobalCSS -.-> Layout
    ResetCSS -.-> Layout
    ComponentStyles -.-> Header
    ComponentStyles -.-> Nav
    ComponentStyles -.-> Article

    %% Configuration Relationships
    NextConfig -.-> NextRuntime
    TSConfig -.-> NextRuntime
    DevTools -.-> NextRuntime
    StaticAssets -.-> NextRuntime

    %% Styling
    classDef component fill:#3498db,stroke:#2980b9,color:white
    classDef styles fill:#2ecc71,stroke:#27ae60,color:white
    classDef framework fill:#9b59b6,stroke:#8e44ad,color:white
    classDef config fill:#f1c40f,stroke:#f39c12,color:black
    classDef assets fill:#e67e22,stroke:#d35400,color:white

    %% Click Events
    click Layout "https://github.com/hakushun/dm_picture-in-picture/blob/main/app/layout.tsx"
    click MainPage "https://github.com/hakushun/dm_picture-in-picture/blob/main/app/page.tsx"
    click Header "https://github.com/hakushun/dm_picture-in-picture/blob/main/app/components/Header/index.tsx"
    click Nav "https://github.com/hakushun/dm_picture-in-picture/blob/main/app/components/Nav/index.tsx"
    click Article "https://github.com/hakushun/dm_picture-in-picture/blob/main/app/components/Article/index.tsx"
    click GlobalCSS "https://github.com/hakushun/dm_picture-in-picture/blob/main/app/styles/global.css"
    click ResetCSS "https://github.com/hakushun/dm_picture-in-picture/blob/main/app/styles/reset.css"
    click StaticAssets "https://github.com/hakushun/dm_picture-in-picture/tree/main/public/"
    click NextConfig "https://github.com/hakushun/dm_picture-in-picture/blob/main/next.config.ts"
    click TSConfig "https://github.com/hakushun/dm_picture-in-picture/blob/main/tsconfig.json"
    click DevTools "https://github.com/hakushun/dm_picture-in-picture/blob/main/.eslintrc.json"

    %% Legend
    subgraph Legend
        L1["🔷 Component"]:::component
        L2["🔶 Styles"]:::styles
        L3["⚙️ Framework"]:::framework
        L4["⚡ Config"]:::config
        L5["📁 Assets"]:::assets
        L6["➡️ Data Flow"]
        L7["⋯> Dev Relationship"]
    end
```
