# joewus12345/portfolio architecture

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

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

## Overview

##### Project Type and Purpose
- This is a full-stack portfolio web application built with Next.js (App Router), showcasing 3D graphics (Three.js), rich animations (Framer Motion), and styled with Tailwind CSS.
- It includes a simple serverless API route (Sentry example) for error reporting and integrates Sentry for client, edge, and server error tracking.

##### File Structure
- Top-level configs: next.config.mjs, tsconfig.json, tailwind.config.ts, Sentry config files, ESLint, PostCSS, VSCode settings.
- “app/”: Next.js App Router root, contains layout.tsx, global CSS, provider.tsx (React context), page.tsx (home), global-error.jsx, and an API route under app/api.
- “components/”: Reusable React components (UI patterns in components/ui and domain-specific in root).
- “data/”: Static JSON and TypeScript exports providing nav items, grid items, projects, testimonials, etc.
- “lib/”: Utility functions (e.g., formatting, helpers).
- “public/”: Static assets (images, JSON files, SVGs).

##### Detail
- Every architectural element: App Router folder, API route, data providers, utility layer, theming system.
- Do not over-abstract—show even small components (UI library vs. domain components) if clarity demands it.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Browser / Client"
        BC1["app/page.tsx"]
        BC2["app/sentry-example-page/page.jsx"]
        BC3["app/provider.tsx"]
        BC4["app/layout.tsx"]
        BC5["app/globals.css"]
        BC6["components/"]
        BC7["components/ui/"]
        BrowserClient(["Browser / Client"])
    end
    subgraph "Next.js Server (SSR/SSG)"
        NSRoot(["Next.js Server"])
        NS1["app/layout.tsx"]
        NS2["app/global-error.jsx"]
        NS3["app/page.tsx"]
        NS4["app/sentry-example-page/page.jsx"]
        APIRoute["app/api/sentry-example-api/route.js"]
    end
    subgraph "Static Asset Store / CDN"
        CDN["public/"]
    end
    subgraph "Data Layer"
        DL1["data/index.ts"]
        DL2["data/confetti.json"]
        DL3["data/globe.json"]
        DL4["lib/utils.ts"]
    end
    subgraph "Sentry Service"
        S1["sentry.client.config.ts"]
        S2["sentry.edge.config.ts"]
        S3["sentry.server.config.ts"]
    end

    BrowserClient -->|"HTTP GET HTML/JSON"| NSRoot
    NSRoot -->|"Respond with HTML, JS & CSS"| BrowserClient
    BrowserClient -->|"Fetch static assets"| CDN
    BrowserClient -->|"Load static data"| DL1
    BrowserClient -->|"Load static data"| DL2
    BrowserClient -->|"Load static data"| DL3
    BrowserClient -->|"Load static utils"| DL4
    BrowserClient -->|"API call"| APIRoute
    APIRoute -->|"Response JSON"| BrowserClient
    BrowserClient -->|"Error logs"| S1
    BrowserClient -->|"Error logs"| S2
    BrowserClient -->|"Error logs"| S3
    NSRoot -->|"Error logs"| S1
    NSRoot -->|"Error logs"| S2
    NSRoot -->|"Error logs"| S3

    click BC1 "https://github.com/joewus12345/portfolio/blob/main/app/page.tsx"
    click BC2 "https://github.com/joewus12345/portfolio/blob/main/app/sentry-example-page/page.jsx"
    click BC3 "https://github.com/joewus12345/portfolio/blob/main/app/provider.tsx"
    click BC4 "https://github.com/joewus12345/portfolio/blob/main/app/layout.tsx"
    click BC5 "https://github.com/joewus12345/portfolio/blob/main/app/globals.css"
    click BC6 "https://github.com/joewus12345/portfolio/tree/main/components/"
    click BC7 "https://github.com/joewus12345/portfolio/tree/main/components/ui/"
    click NS1 "https://github.com/joewus12345/portfolio/blob/main/app/layout.tsx"
    click NS2 "https://github.com/joewus12345/portfolio/blob/main/app/global-error.jsx"
    click NS3 "https://github.com/joewus12345/portfolio/blob/main/app/page.tsx"
    click NS4 "https://github.com/joewus12345/portfolio/blob/main/app/sentry-example-page/page.jsx"
    click APIRoute "https://github.com/joewus12345/portfolio/blob/main/app/api/sentry-example-api/route.js"
    click CDN "https://github.com/joewus12345/portfolio/tree/main/public/"
    click DL1 "https://github.com/joewus12345/portfolio/blob/main/data/index.ts"
    click DL2 "https://github.com/joewus12345/portfolio/blob/main/data/confetti.json"
    click DL3 "https://github.com/joewus12345/portfolio/blob/main/data/globe.json"
    click DL4 "https://github.com/joewus12345/portfolio/blob/main/lib/utils.ts"
    click S1 "https://github.com/joewus12345/portfolio/blob/main/sentry.client.config.ts"
    click S2 "https://github.com/joewus12345/portfolio/blob/main/sentry.edge.config.ts"
    click S3 "https://github.com/joewus12345/portfolio/blob/main/sentry.server.config.ts"

    classDef client fill:#cce5ff,stroke:#005b96,color:#000;
    classDef server fill:#d4edda,stroke:#155724,color:#000;
    classDef assets fill:#f0f0f0,stroke:#6c757d,color:#000;
    classDef data fill:#e2e3e5,stroke:#6c757d,color:#000;
    classDef external fill:#ffe5cc,stroke:#cc8400,color:#000;

    class BrowserClient,BC1,BC2,BC3,BC4,BC5,BC6,BC7 client;
    class NSRoot,NS1,NS2,NS3,NS4,APIRoute server;
    class CDN assets;
    class DL1,DL2,DL3,DL4 data;
    class S1,S2,S3 external;
```
