# itsyaba/portfolio-v2 architecture

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

- Interactive diagram: https://gitdiagram.com/itsyaba/portfolio-v2
- Repository: https://github.com/itsyaba/portfolio-v2

## Overview

##### Project type and purpose
- This is a Next.js 13 “app‐router” portfolio site whose sole purpose is to showcase a developer’s work, experience, and contact form. It’s a front‐end–centric application (no custom backend), rendered via SSG/SSR on Vercel, styled with Tailwind CSS, and built with React/TypeScript.

##### File structure
- Top‐level:
- Configuration files (.eslintrc.json, next.config.mjs, tailwind.config.ts, tsconfig.json, package.json)
- src/app: Next.js entrypoints (layout.tsx, page.tsx, globals.css)
- src/components & src/components/ui: Reusable UI building blocks
- src/sections: Page‐specific slices (About, Hero, Projects, Contact, etc.)
- src/lib/utils.ts: General helper functions

##### README for additional insights
- Describes features: responsive layout, project showcase, contact form, optimized performance

##### Elements
– Blue for client-side elements
– Green for serverless/CDN
– Yellow for build-time tools
– Gray for static assets

##### Be detailed—capture every architectural element
- How src/lib/utils.ts is imported by components/sections at runtime
- Distinguish between build-time steps (npm scripts, Tailwind processing) and runtime steps (SSR/SSG, hydration)
- Don’t forget global CSS (globals.css) in the layout

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Client Side
    Browser["Browser (User Agent)"]:::client
    Browser -->|Request HTTP GET| CDN

    %% CDN & Hosting
    CDN["Vercel CDN"]:::cdn
    CDN -->|Cache Miss / Invoke| Serverless

    %% Serverless Functions
    Serverless["Next.js Serverless Function\n(SSR/SSG)"]:::server
    Serverless -->|Reads Code & Assets| FileSystem

    %% File System Structure
    subgraph "File System"
        direction TB
        subgraph "Configuration Files"
            direction TB
            NextConfig["next.config.mjs"]:::config
            TailwindConfig["tailwind.config.ts\npostcss.config.mjs"]:::config
            TSConfig["tsconfig.json"]:::config
            ESLintConfig[".eslintrc.json"]:::config
            PackageJSON["package.json"]:::config
            README["README.md"]:::config
        end
        subgraph "Source Code"
            direction TB
            RoutingLayer["Next.js Routing Layer"]:::code
            LayoutTemplates["Page Layout & Templates\n(layout.tsx, page.tsx)"]:::code
            GlobalStyles["Global Styles\n(globals.css)"]:::code
            Components["Reusable UI Components"]:::code
            UIHelpers["Atomic/UI Helpers"]:::code
            Sections["Page Sections"]:::code
            Utils["Utility Module"]:::code
        end
        subgraph "Public Assets"
            direction TB
            Images["Static Images"]:::assets
            Icons["Static Icons"]:::assets
            Resume["Resume PDF"]:::assets
        end
    end

    Serverless -->|Generates HTML/CSS/JS| Browser

    %% Hydration
    Browser -->|Hydration| ReactTree
    ReactTree["React Component Tree\n(Components & Sections)"]:::client

    %% Build Toolchain
    subgraph "Build Toolchain"
        direction TB
        NpmScripts["npm scripts"]:::build
        TailwindPipeline["Tailwind CSS / PostCSS"]:::build
    end
    NpmScripts --> TailwindPipeline
    TailwindPipeline -->|Deploy Artifacts| CDN

    %% Click Events
    click RoutingLayer "https://github.com/itsyaba/portfolio-v2/tree/main/src/app"
    click LayoutTemplates "https://github.com/itsyaba/portfolio-v2/blob/main/src/app/layout.tsx"
    click LayoutTemplates "https://github.com/itsyaba/portfolio-v2/blob/main/src/app/page.tsx"
    click GlobalStyles "https://github.com/itsyaba/portfolio-v2/blob/main/src/app/globals.css"
    click Components "https://github.com/itsyaba/portfolio-v2/tree/main/src/components"
    click UIHelpers "https://github.com/itsyaba/portfolio-v2/tree/main/src/components/ui"
    click Sections "https://github.com/itsyaba/portfolio-v2/tree/main/src/sections"
    click Utils "https://github.com/itsyaba/portfolio-v2/blob/main/src/lib/utils.ts"
    click Images "https://github.com/itsyaba/portfolio-v2/tree/main/public/images"
    click Icons "https://github.com/itsyaba/portfolio-v2/tree/main/public/icons"
    click Resume "https://github.com/itsyaba/portfolio-v2/blob/main/public/resume.pdf"
    click NextConfig "https://github.com/itsyaba/portfolio-v2/blob/main/next.config.mjs"
    click TailwindConfig "https://github.com/itsyaba/portfolio-v2/blob/main/tailwind.config.ts"
    click TailwindConfig "https://github.com/itsyaba/portfolio-v2/blob/main/postcss.config.mjs"
    click TSConfig "https://github.com/itsyaba/portfolio-v2/blob/main/tsconfig.json"
    click ESLintConfig "https://github.com/itsyaba/portfolio-v2/blob/main/.eslintrc.json"
    click PackageJSON "https://github.com/itsyaba/portfolio-v2/blob/main/package.json"
    click README "https://github.com/itsyaba/portfolio-v2/blob/main/README.md"

    %% Styles
    classDef client fill:#D0E8FF,stroke:#0366D6,stroke-width:1px
    classDef cdn fill:#DFF5E1,stroke:#28A745,stroke-width:1px
    classDef server fill:#E8F9FD,stroke:#17A2B8,stroke-width:1px
    classDef code fill:#FFF9C4,stroke:#FBC02D,stroke-width:1px
    classDef assets fill:#F5F5F5,stroke:#6C757D,stroke-width:1px
    classDef config fill:#EFEFEF,stroke:#343A40,stroke-width:1px
    classDef build fill:#FFF3CD,stroke:#FFEEBA,stroke-width:1px
```
