# ddevv15/portfolio architecture

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

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

## Overview

##### Project Type & Purpose
- This is a full-stack, React-based web application built with Next.js (App Router).
- Purpose: A personal/portfolio site with multiple pages (About, Contact, Projects, Skills, Experience, Education), optimized fonts, and Tailwind CSS styling.

##### File Structure
A. Top-Level Directories & Files
- `app/` – Next.js App Router folder: contains page routes (page.tsx), global layout (`layout.tsx`), global CSS (`globals.css`).
- `components/` – shared UI components (navigation, page-layout, terminal overlay).
- `lib/` – utility functions (`utils.ts`).
- `public/` – static assets (images, favicons).
- `docs/` – markdown documentation (e.g., `activity.md`).
- Root configs – ESLint (`.eslintrc.json`), TypeScript (`tsconfig.json`), Jest (`jest.config.js`, `jest.setup.js`), Tailwind (`tailwind.config.js`), PostCSS (`postcss.config.mjs`), Next.js (`next.config.js`, `next.config.ts`), GitHub Actions (`.github/workflows/nextjs.yml`).

##### README Insights
- Built with Create Next App
- Uses next/font to auto-optimize Geist font
- Deploys to Vercel (CI/CD)
- Supports local development, hot reload, and static optimization

##### Main Components & Relationships
A. Client Browser
- Sends HTTP/HTTPS requests, renders React pages, fetches CSS & static assets.
B. Next.js Server (Node.js Runtime)
- Handles routing (`app/**/*.tsx`), Server-Side Rendering (SSR) or Static Site Generation (SSG).
- Applies global layout and page-specific components.
- Integrates next/font for optimized font loading.
C. Static Assets Storage (`public/`)
D. Styling Pipeline
- Tailwind CSS + PostCSS transforms `app/globals.css` and component styles.
E. Utility Layer (`lib/utils.ts`)
- Shared functions used in multiple pages/components.
F. Build & CI/CD
- `next build` → output optimized files
- GitHub Actions (`.github/workflows/nextjs.yml`) runs lint, tests (Jest), and deploys to Vercel.
G. External Services
- Vercel platform for hosting & CDN
- (Optional) Analytics or third-party APIs if integrated

##### Architectural Patterns & Design Principles
- App Router with file-based routing
- Component-driven UI (`components/`)
- Separation of concerns: pages vs. reusable components vs. utilities
- CSS utility framework (Tailwind) for styling
- CI/CD pipeline with automated linting, testing, and deployment

##### Putting It All Together
- Layer 1 (Client Layer): Browser
- Layer 2 (Runtime Layer): Next.js Server + CSS pipeline + Utilities
- Layer 3 (Data/Assets Layer): Public folder, Fonts (next/font), Lib utils
- Layer 4 (Build & Deploy Layer): GitHub Actions → Vercel

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Client Layer
    Browser["Client Browser"]:::client

    %% Runtime Layer
    subgraph "Next.js Server & App Router"
        direction TB
        NextServer["Next.js App Server (Node.js Runtime)"]:::server
        subgraph "App Router (app/)"
            direction TB
            Layout["Global Layout"]:::server
            Globals["Global Styles (app/globals.css)"]:::pipeline
            Home["Home Page (app/page.tsx)"]:::server
            About["About Page (app/about/page.tsx)"]:::server
            Contact["Contact Page (app/contact/page.tsx)"]:::server
            Projects["Projects Page (app/projects/page.tsx)"]:::server
            Skills["Skills Page (app/skills/page.tsx)"]:::server
            Experience["Experience Page (app/experience/page.tsx)"]:::server
            Education["Education Page (app/education/page.tsx)"]:::server
        end
        subgraph "Shared UI Components (components/)"
            direction TB
            Nav["Navigation Component"]:::service
            PageLayout["Page Layout Component"]:::service
            Terminal["Terminal Overlay Component"]:::service
        end
        Utils["Utility Layer (lib/utils.ts)"]:::service
        CSS["Tailwind/PostCSS Pipeline"]:::pipeline
    end

    %% Data/Assets Layer
    Public["Static Assets Storage (public/)"]:::static
    Font["Optimized Fonts (next/font)"]:::static

    %% Build & CI/CD Layer
    subgraph "Build & CI/CD"
        direction TB
        CI["GitHub Actions (.github/workflows/nextjs.yml)"]:::build
        Build["Build (next build)"]:::build
        Dev["Dev Environment (npm run dev)"]:::dev
    end

    %% External Services
    Vercel["Vercel Platform & CDN"]:::external

    %% Connections
    Browser -->|"HTTP Request"| NextServer
    NextServer -->|"SSR HTML & JS"| Browser
    Browser -->|"Fetch CSS & Static Assets"| Public
    Browser -->|"Fetch Fonts via CDN"| Vercel
    Browser -->|"Hot Reload"| Dev
    Dev -->|"Runs Dev Server"| NextServer
    NextServer -->|"Uses CSS Pipeline"| CSS
    CSS -->|"Transforms Styles"| Globals
    NextServer -->|"Uses Utilities"| Utils
    CI -->|"Runs lint & tests"| Build
    CI -->|"Deploys"| Vercel
    Build -->|"Produces Deployment"| Vercel
    Vercel -->|"Serves App"| Browser

    %% Click Events
    click Layout "https://github.com/ddevv15/portfolio/blob/main/app/layout.tsx"
    click Globals "https://github.com/ddevv15/portfolio/blob/main/app/globals.css"
    click Home "https://github.com/ddevv15/portfolio/blob/main/app/page.tsx"
    click About "https://github.com/ddevv15/portfolio/blob/main/app/about/page.tsx"
    click Contact "https://github.com/ddevv15/portfolio/blob/main/app/contact/page.tsx"
    click Projects "https://github.com/ddevv15/portfolio/blob/main/app/projects/page.tsx"
    click Skills "https://github.com/ddevv15/portfolio/blob/main/app/skills/page.tsx"
    click Experience "https://github.com/ddevv15/portfolio/blob/main/app/experience/page.tsx"
    click Education "https://github.com/ddevv15/portfolio/blob/main/app/education/page.tsx"
    click Nav "https://github.com/ddevv15/portfolio/blob/main/components/navigation.tsx"
    click PageLayout "https://github.com/ddevv15/portfolio/blob/main/components/page-layout.tsx"
    click Terminal "https://github.com/ddevv15/portfolio/blob/main/components/terminal-overlay.tsx"
    click Utils "https://github.com/ddevv15/portfolio/blob/main/lib/utils.ts"
    click Public "https://github.com/ddevv15/portfolio/tree/main/public/"
    click Font "https://github.com/ddevv15/portfolio/tree/main/public/"
    click CI "https://github.com/ddevv15/portfolio/blob/main/.github/workflows/nextjs.yml"
    click Dev "https://github.com/ddevv15/portfolio/blob/main/next.config.js"
    click CSS "https://github.com/ddevv15/portfolio/blob/main/tailwind.config.js"
    click CSS "https://github.com/ddevv15/portfolio/blob/main/postcss.config.mjs"
    click NextServer "https://github.com/ddevv15/portfolio/blob/main/next.config.js"
    click NextServer "https://github.com/ddevv15/portfolio/blob/main/next.config.ts"
    click Dev "https://github.com/ddevv15/portfolio/blob/main/tsconfig.json"
    click CI "https://github.com/ddevv15/portfolio/blob/main/.eslintrc.json"
    click CI "https://github.com/ddevv15/portfolio/blob/main/jest.config.js"
    click CI "https://github.com/ddevv15/portfolio/blob/main/jest.setup.js"
    click CI "https://github.com/ddevv15/portfolio/blob/main/.github/workflows/nextjs.yml"

    %% Styles
    classDef client fill:#a2f5a1,stroke:#333,stroke-width:1px
    classDef server fill:#a1c4fd,stroke:#333,stroke-width:1px
    classDef pipeline fill:#fde68a,stroke:#333,stroke-width:1px
    classDef service fill:#fef9c3,stroke:#333,stroke-width:1px
    classDef static fill:#fde47a,stroke:#333,stroke-width:1px
    classDef build fill:#d1d5db,stroke:#333,stroke-width:1px
    classDef external fill:#fcd34d,stroke:#333,stroke-width:1px
    classDef dev fill:#c7d2fe,stroke:#333,stroke-width:1px
```
