# notken12/portfolio architecture

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

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

## Overview

##### Project type and purpose
- This is a single‐repo, Next.js‐based portfolio website (“Ken’s Portfolio”) that uses the App Router (src/app), generates static pages (SSG/ISR), and delivers them via a serverless/CI/CD pipeline (e.g., Vercel).
- Purpose: showcase projects and photography, with fast page loads, theme toggling, and revalidation for dynamic content (photography).

##### File structure
- Top-level config files:
- next.config.mjs, tsconfig.json, tailwind.config.ts, postcss.config.mjs, .eslintrc.json
- GitHub Actions workflow: .github/workflows/nextjs.yml
- Public assets: public/fonts, public/images
- Source code under src/:
- src/app: Next.js pages and routing (layout.tsx, page.tsx, photography page, revalidate route)
- src/components: reusable UI (mode-toggle, theme-provider)
- src/components/ui: atomic design components (buttons, cards, avatars, dropdowns, etc.)
- src/lib: shared utilities (utils.ts)
- package.json & lockfiles: dependency definitions and scripts (dev, build, start)

##### README for additional insights
- Built with Next.js, Tailwind CSS, shadcn/ui, Aceternity UI
- Supports local dev (`npm run dev`) and Vercel deployment
- Uses next/font for optimized font loading

## Diagram (Mermaid)

```mermaid
graph TB
    classDef client fill:#ddd,stroke:#333,stroke-width:1px;
    classDef static fill:#b2f2bb,stroke:#2f6627,stroke-width:1px;
    classDef compute fill:#a5d8ff,stroke:#1c7ed6,stroke-width:1px;
    classDef ci fill:#ffd8a8,stroke:#e8590c,stroke-width:1px;
    classDef config fill:#eebefa,stroke:#9c36b5,stroke-width:1px;

    subgraph "Client Layer"
        Browser["Browser"]:::client
    end

    Browser -->|Requests| CDN["CDN / Edge Network"]:::static

    subgraph "Rendering Layer (Serverless)"
        SSR["Next.js Serverless Functions (src/app)"]:::compute
    end

    CDN -->|Invoke SSR| SSR
    SSR -->|Return HTML/JSON| CDN

    subgraph "Static Assets Layer"
        Fonts["Fonts"]:::static
        Images["Images"]:::static
    end

    SSR -->|Read Assets| Fonts
    SSR -->|Read Assets| Images
    CDN -->|Serve Static| Fonts
    CDN -->|Serve Static| Images

    subgraph "UI Components & Utilities"
        Components["Atomic UI Library"]:::compute
        Theme["Theme Provider Context"]:::compute
        Toggle["Color Mode Toggle"]:::compute
        Utils["Shared Utilities"]:::compute
    end

    Components --> SSR
    Theme --> SSR
    Toggle --> SSR
    Utils --> SSR

    subgraph "Pages (App Router)"
        Layout["Main Layout Component"]:::compute
        Home["Home Page (static)"]:::compute
        Photography["Photography Page (ISR)"]:::compute
        Revalidate["Revalidate Route"]:::compute
    end

    Layout --> Home
    Layout --> Photography
    Photography --> Revalidate
    Home --> SSR
    Photography --> SSR
    Revalidate --> SSR

    subgraph "CI/CD Pipeline"
        Actions["GitHub Actions Workflow"]:::ci
        Vercel["Vercel Deployment"]:::ci
    end

    Actions -->|Deploy| Vercel
    Vercel -->|Deploy Code| SSR
    Vercel -->|Invalidate CDN| CDN

    subgraph "Configuration Files"
        NextConfig["next.config.mjs"]:::config
        Tailwind["tailwind.config.ts"]:::config
        PostCSS["postcss.config.mjs"]:::config
        TSConfig["tsconfig.json"]:::config
        ESLint[".eslintrc.json"]:::config
        Package["package.json / lockfiles"]:::config
    end

    NextConfig --> SSR
    NextConfig --> CDN
    Tailwind --> SSR
    PostCSS --> SSR
    TSConfig --> SSR
    ESLint --> SSR
    Package --> Actions

    click SSR "https://github.com/notken12/portfolio/tree/main/src/app"
    click Layout "https://github.com/notken12/portfolio/blob/main/src/app/layout.tsx"
    click Home "https://github.com/notken12/portfolio/blob/main/src/app/page.tsx"
    click Photography "https://github.com/notken12/portfolio/blob/main/src/app/photography/page.tsx"
    click Revalidate "https://github.com/notken12/portfolio/blob/main/src/app/photography/revalidate/route.ts"
    click Components "https://github.com/notken12/portfolio/tree/main/src/components/ui"
    click Theme "https://github.com/notken12/portfolio/blob/main/src/components/theme-provider.tsx"
    click Toggle "https://github.com/notken12/portfolio/blob/main/src/components/mode-toggle.tsx"
    click Utils "https://github.com/notken12/portfolio/blob/main/src/lib/utils.ts"
    click Fonts "https://github.com/notken12/portfolio/tree/main/public/fonts"
    click Images "https://github.com/notken12/portfolio/tree/main/public/images"
    click Actions "https://github.com/notken12/portfolio/blob/main/.github/workflows/nextjs.yml"
    click NextConfig "https://github.com/notken12/portfolio/blob/main/next.config.mjs"
    click Tailwind "https://github.com/notken12/portfolio/blob/main/tailwind.config.ts"
    click PostCSS "https://github.com/notken12/portfolio/blob/main/postcss.config.mjs"
    click TSConfig "https://github.com/notken12/portfolio/blob/main/tsconfig.json"
    click ESLint "https://github.com/notken12/portfolio/blob/main/.eslintrc.json"
    click Package "https://github.com/notken12/portfolio/blob/main/package.json"
```
