# pddang/cv architecture

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

- Interactive diagram: https://gitdiagram.com/pddang/cv
- Repository: https://github.com/pddang/cv

## Overview

##### Project Components
- Next.js Application: Represented by the overall application structure (src/app and next.config.js). This includes:
- Layout and pages (e.g., layout.tsx and page.tsx) that define the overall user interface.
- Routing and rendering provided by Next.js.
- Components Layer: All reusable UI elements are found in src/components. This can be subdivided into:
- Functional components (e.g., project-card.tsx, command-menu.tsx, print-drawer.tsx).
- Dedicated UI sub-components (inside src/components/ui) like avatar, badge, button, card, dialog, and drawer.
- Data and Content:
- The src/data folder holds the resume-data.tsx, providing the content for the personal website.
- Assets:
- The public directory and src/images provide static resources such as logos and other images.
- Utilities and Configurations:
- The src/lib folder contains utility functions.
- Various configuration files (.eslintrc.json, .prettierrc, tailwind.config.js, tsconfig.json, etc.) define development, styling, and build-time settings.

##### Relationships and Interactions
- The Next.js application, defined primarily in the src/app directory, serves as the primary entry point and uses the layout and page components to render content.
- Content pulled from src/data (e.g., resume-data.tsx) feeds into these components, binding the data to the UI.
- Assets under public and src/images are served as static files to enrich the UI, while helper functions from src/lib provide additional functionality.
- Deployment on Vercel implies that these components are statically optimized or server-side rendered based on Next.js configuration.

##### Architectural Patterns
- Component-based UI Architecture: Emphasize the separation of concerns—layout, presentation (UI components), and data.
- Separation of Data and Presentation: Content (resume-data) is maintained separately and injected into the UI components.
- Next.js Routing and Rendering: Use of file-based routing (via src/app) is central to the project’s flow.
- Tailwind CSS and Utility-driven Styling: Clear use of Tailwind for UI styling is evident via the tailwind.config.js.

## Diagram (Mermaid)

```mermaid
flowchart TD

    %% Frontend Application
    subgraph "Frontend Application"
        layout["Next.js Layout"]:::nextjs
        page["Next.js Page"]:::nextjs
        nextConfig["Next Config"]:::nextjs
    end

    %% Components Layer
    subgraph "Components Layer"
        subgraph "Custom Components"
            commandMenu["Command Menu"]:::components
            printDrawer["Print Drawer"]:::components
            projectCard["Project Card"]:::components
        end
        subgraph "Icons"
            githubIcon["GitHub Icon"]:::components
            linkedInIcon["LinkedIn Icon"]:::components
            xIcon["X Icon"]:::components
            iconsIndex["Icons Index"]:::components
        end
        subgraph "UI Components"
            uiAvatar["Avatar"]:::components
            uiBadge["Badge"]:::components
            uiButton["Button"]:::components
            uiCard["Card"]:::components
            uiCommand["Command"]:::components
            uiDialog["Dialog"]:::components
            uiDrawer["Drawer"]:::components
            uiSection["Section"]:::components
        end
    end

    %% Data & Content
    subgraph "Data & Content"
        resume["Resume Data"]:::data
    end

    %% Static Assets
    subgraph "Static Assets"
        publicAssets["Public Assets"]:::assets
        images["Images"]:::assets
        logos["Logos"]:::assets
    end

    %% Utilities & Configurations
    subgraph "Utilities & Configurations"
        utils["Lib/Utils"]:::utils
        subgraph "Configurations"
            eslint[".eslintrc.json"]:::config
            prettier[".prettierrc"]:::config
            tailwind["tailwind.config.js"]:::config
            tsconfig["tsconfig.json"]:::config
            postcss["postcss.config.js"]:::config
        end
    end

    %% External Deployment
    vercel["Vercel Deployment"]:::external

    %% Connections
    resume -->|"feeds"| layout
    nextConfig -->|"configures"| layout
    layout -->|"wraps"| page

    layout -->|"renders"| commandMenu
    layout -->|"renders"| printDrawer
    layout -->|"renders"| projectCard
    layout -->|"uses"| uiAvatar
    layout -->|"uses"| githubIcon

    layout -->|"calls"| utils

    publicAssets -->|"serves"| layout
    images -->|"serves"| layout
    logos -->|"contained in"| images

    eslint -->|"influences"| nextConfig
    prettier -->|"influences"| nextConfig
    tailwind -->|"influences"| nextConfig
    tsconfig -->|"influences"| nextConfig
    postcss -->|"influences"| nextConfig

    vercel -->|"deploys"| nextConfig

    %% Click Events
    click layout "https://github.com/pddang/cv/blob/main/src/app/layout.tsx"
    click page "https://github.com/pddang/cv/blob/main/src/app/page.tsx"
    click nextConfig "https://github.com/pddang/cv/blob/main/next.config.js"
    
    click commandMenu "https://github.com/pddang/cv/blob/main/src/components/command-menu.tsx"
    click printDrawer "https://github.com/pddang/cv/blob/main/src/components/print-drawer.tsx"
    click projectCard "https://github.com/pddang/cv/blob/main/src/components/project-card.tsx"
    
    click githubIcon "https://github.com/pddang/cv/blob/main/src/components/icons/GitHubIcon.tsx"
    click linkedInIcon "https://github.com/pddang/cv/blob/main/src/components/icons/LinkedInIcon.tsx"
    click xIcon "https://github.com/pddang/cv/blob/main/src/components/icons/XIcon.tsx"
    click iconsIndex "https://github.com/pddang/cv/blob/main/src/components/icons/index.ts"
    
    click uiAvatar "https://github.com/pddang/cv/blob/main/src/components/ui/avatar.tsx"
    click uiBadge "https://github.com/pddang/cv/blob/main/src/components/ui/badge.tsx"
    click uiButton "https://github.com/pddang/cv/blob/main/src/components/ui/button.tsx"
    click uiCard "https://github.com/pddang/cv/blob/main/src/components/ui/card.tsx"
    click uiCommand "https://github.com/pddang/cv/blob/main/src/components/ui/command.tsx"
    click uiDialog "https://github.com/pddang/cv/blob/main/src/components/ui/dialog.tsx"
    click uiDrawer "https://github.com/pddang/cv/blob/main/src/components/ui/drawer.tsx"
    click uiSection "https://github.com/pddang/cv/blob/main/src/components/ui/section.tsx"
    
    click resume "https://github.com/pddang/cv/blob/main/src/data/resume-data.tsx"
    
    click publicAssets "https://github.com/pddang/cv/tree/main/public"
    click images "https://github.com/pddang/cv/tree/main/src/images"
    click logos "https://github.com/pddang/cv/tree/main/src/images/logos"
    
    click utils "https://github.com/pddang/cv/blob/main/src/lib/utils.ts"
    
    click eslint "https://github.com/pddang/cv/blob/main/.eslintrc.json"
    click prettier "https://github.com/pddang/cv/blob/main/.prettierrc"
    click tailwind "https://github.com/pddang/cv/blob/main/tailwind.config.js"
    click tsconfig "https://github.com/pddang/cv/blob/main/tsconfig.json"
    click postcss "https://github.com/pddang/cv/blob/main/postcss.config.js"

    %% Styles
    classDef nextjs fill:#AED6F1,stroke:#000,stroke-width:2px,color:#000;
    classDef components fill:#A9DFBF,stroke:#000,stroke-width:2px,color:#000;
    classDef data fill:#F9E79F,stroke:#000,stroke-width:2px,color:#000;
    classDef assets fill:#FAD7A0,stroke:#000,stroke-width:2px,color:#000;
    classDef utils fill:#D7BDE2,stroke:#000,stroke-width:2px,color:#000;
    classDef config fill:#F5B7B1,stroke:#000,stroke-width:2px,color:#000;
    classDef external fill:#F4D03F,stroke:#000,stroke-width:2px,color:#000;
```
