# umekikazuya/markdowntablegenerator architecture

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

- Interactive diagram: https://gitdiagram.com/umekikazuya/markdowntablegenerator
- Repository: https://github.com/umekikazuya/markdowntablegenerator

## Overview

##### Project Type Analysis
This is a Next.js-based web application that appears to be a single-page application (SPA) focused on generating markdown tables. It uses the App Router architecture (indicated by the src/app directory structure) and includes UI components, custom hooks, and utility functions.

##### Main Components

A. Frontend Layer (Client-Side):
- Pages/Routes (src/app)
- UI Components (src/components)
- Custom Hooks (src/hooks)
- Utility Functions (src/utils)

B. Next.js Framework Layer:
- App Router
- Server Components
- Client Components
- Static Asset Handling

**┌─────────────────────────────────────────────┐**
- Client Layer                 │
- ┌─────────┐ ┌─────────┐ ┌───────────────┐ │
- Pages  │ │   UI    │ │  Components   │ │
- ┘ └─────────┘ └───────────────┘ │
- ┤
- Business Logic                 │
- ┌─────────┐ ┌─────────────────────────────┐│
- Hooks  │ │      Utility Functions      ││
- ┘ └─────────────────────────────┘│
- ┤
- Next.js Framework               │
- ┌─────────┐ ┌─────────┐ ┌───────────────┐ │
- Router │ │  SSR    │ │     Static    │ │
- ┘ └─────────┘ └───────────────┘ │
- ┘

##### Component Relationships

- Page components importing and using UI components
- Components utilizing custom hooks
- Hooks implementing utility functions
- Data flow between components and hooks

##### Specific Implementation Details

Key components:
- MarkdownTableGenerator component
- UI components (Button, Card, Checkbox, Textarea, Toast, Tooltip)
- Custom hooks (useClipboard, useMarkDownGenerator, useTableData)
- Utility functions (markdownUtils, tableUtils)

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Client Layer"
        direction TB
        Pages["Pages"]
        UI["UI Layer"]
        Components["Components"]
    end

    subgraph "Business Logic"
        direction TB
        Hooks["Custom Hooks"]
        Utils["Utility Functions"]
    end

    subgraph "Next.js Framework"
        direction TB
        Router["App Router"]
        SSR["Server Components"]
        Static["Static Assets"]
    end

    %% Component Details
    Pages --> Layout["Layout"]:::page
    Pages --> MainPage["Main Page"]:::page
    
    UI --> Button["Button"]:::ui
    UI --> Card["Card"]:::ui
    UI --> Checkbox["Checkbox"]:::ui
    UI --> Textarea["Textarea"]:::ui
    UI --> Toast["Toast"]:::ui
    UI --> Tooltip["Tooltip"]:::ui
    
    Components --> MDGenerator["Markdown Table Generator"]:::component
    
    Hooks --> UseClipboard["useClipboard"]:::hook
    Hooks --> UseMarkdown["useMarkDownGenerator"]:::hook
    Hooks --> UseTableData["useTableData"]:::hook
    
    Utils --> MarkdownUtils["Markdown Utils"]:::util
    Utils --> TableUtils["Table Utils"]:::util
    
    %% Configuration Nodes
    Config["Configuration Files"]:::config
    Styles["Global Styles"]:::styles

    %% Relationships
    MDGenerator --> UI
    MDGenerator --> Hooks
    Hooks --> Utils
    Layout --> UI
    MainPage --> MDGenerator
    Router --> Pages
    
    %% Component Mappings
    click Layout "https://github.com/umekikazuya/MarkdownTableGenerator/blob/develop/src/app/layout.tsx"
    click MainPage "https://github.com/umekikazuya/MarkdownTableGenerator/blob/develop/src/app/page.tsx"
    click MDGenerator "https://github.com/umekikazuya/MarkdownTableGenerator/blob/develop/src/components/markdown-table-generator.tsx"
    click Button "https://github.com/umekikazuya/MarkdownTableGenerator/blob/develop/src/components/ui/button.tsx"
    click Card "https://github.com/umekikazuya/MarkdownTableGenerator/blob/develop/src/components/ui/card.tsx"
    click Checkbox "https://github.com/umekikazuya/MarkdownTableGenerator/blob/develop/src/components/ui/checkbox.tsx"
    click Textarea "https://github.com/umekikazuya/MarkdownTableGenerator/blob/develop/src/components/ui/textarea.tsx"
    click Toast "https://github.com/umekikazuya/MarkdownTableGenerator/blob/develop/src/components/ui/toast.tsx"
    click Tooltip "https://github.com/umekikazuya/MarkdownTableGenerator/blob/develop/src/components/ui/tooltip.tsx"
    click UseClipboard "https://github.com/umekikazuya/MarkdownTableGenerator/blob/develop/src/hooks/useClipboard.ts"
    click UseMarkdown "https://github.com/umekikazuya/MarkdownTableGenerator/blob/develop/src/hooks/useMarkDownGenerator.ts"
    click UseTableData "https://github.com/umekikazuya/MarkdownTableGenerator/blob/develop/src/hooks/useTableData.ts"
    click MarkdownUtils "https://github.com/umekikazuya/MarkdownTableGenerator/blob/develop/src/utils/markdownUtils.ts"
    click TableUtils "https://github.com/umekikazuya/MarkdownTableGenerator/blob/develop/src/utils/tableUtils.ts"
    click Config "https://github.com/umekikazuya/MarkdownTableGenerator/blob/develop/next.config.ts"
    click Styles "https://github.com/umekikazuya/MarkdownTableGenerator/blob/develop/src/app/globals.css"

    %% Styling
    classDef page fill:#e1f5fe,stroke:#01579b
    classDef ui fill:#e8f5e9,stroke:#2e7d32
    classDef component fill:#fff3e0,stroke:#ef6c00
    classDef hook fill:#fff8e1,stroke:#f9a825
    classDef util fill:#fce4ec,stroke:#c2185b
    classDef config fill:#f3e5f5,stroke:#7b1fa2
    classDef styles fill:#e8eaf6,stroke:#3f51b5

    %% Legend
    subgraph Legend
        L1["Page Component"]:::page
        L2["UI Component"]:::ui
        L3["Custom Component"]:::component
        L4["Custom Hook"]:::hook
        L5["Utility Function"]:::util
        L6["Configuration"]:::config
        L7["Styles"]:::styles
    end
```
