# adrianrusan/personal-portfolio architecture

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

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

## Overview

##### Project Type & Purpose
- This is a personal portfolio website built using Next.js, TypeScript, and Tailwind CSS. Its purpose is to display information about you, including an About Me section, your projects, testimonials, and contact details.
- The README confirms that it serves as a showcase of your projects and skills. Since it’s a primarily front-end application rendered through Next.js, the architecture mostly focuses on client-side rendering with some server-side capabilities provided by Next.js.

##### File Structure
- Key top-level directories & files:
- The “app” directory contains the main Next.js pages such as layout.tsx, custom error pages (global-error.jsx, not-found.tsx), and utility endpoints (robots.ts, sitemap.ts).
- The “components” directory houses all the reusable UI elements (e.g., About, Projects, Hero, Footer, etc.) and a nested “ui” directory for specialized widgets (animations, toggles, backgrounds) that add visual flair.
- The “context” directory contains state management (a theme provider) to globally manage things like theming.
- The “data” directory holds JSON data and perhaps metadata (confetti.json, globe.json) used by the site.
- Other directories include “lib” (utility functions), “public” (static assets and site configuration), and configuration files (Tailwind, ESLint, Next.js config, etc.).
- Notice that Sentry configuration files and deployment configuration (next.config etc.) indicate application monitoring and continuous integration.

##### Identifying Main Architectural Components
- Next.js Application Core:
- Pages & Layout: The “app” folder comprises the core of the application using file-based routing. It includes application-wide layout management (layout.tsx) and error handling (global-error.jsx, not-found.tsx).
- API endpoints (if any) or utility routes like sitemap/robots, providing additional functionality.
- UI Layer:
- React Components: Developed under “components” and its “ui” subdirectory, these cover various sections (About, Projects, Testimonials, etc.) and interactive UI elements (buttons, dropdowns, effects).
- Global Context:
- The “context/theme-provider.tsx” is used to manage theme switching and possibly other global states.
- Data Management:
- The “data” folder imports static JSON and TS modules to feed dynamic content into pages.
- Utility & External Integrations:
- “lib/utils.ts” supplies helper functions.
- Sentry configuration files (sentry.client.config.ts, etc.) integrate error monitoring.
- Deployment/CD configurations prepared for Vercel or Netlify.

1. Client-Side Presentation Layer:
- Next.js “app” for routing, layouts, error pages, and static page rendering.
- A collection of “components” for each section: Hero, About, Projects, etc.
2. Global Context & State:
- Context/Theme Provider managing the overall UI state (light/dark mode, etc.).
3. Data & Utility Layer:
- “data” module for static JSON content.
- “lib” containing utility functions.
4. External Services & Monitoring:
- Sentry: Connected to the application through its dedicated configuration files for client, server, and edge.
5. Infrastructure:
- Deployment Platform: Indicate platforms like Vercel or Netlify handling CI/CD and production hosting.
- Flow between these components:
- “context” layer feeding state into both the app and components (for global theming).
- That “data” and “lib” provide input to pages/components.
- Optionally, annotate how configuration files enable Tailwind CSS, Next.js, and ESLint.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Next.js Application Core
    subgraph "Next.js App Layer"
        A["layout.tsx"]:::app
        B["global-error.jsx"]:::app
        C["not-found.tsx"]:::app
        D["page.tsx"]:::app
        E["robots.ts"]:::app
        F["sitemap.ts"]:::app
    end

    %% UI Layer: React Components and UI Widgets
    subgraph "UI Components"
        subgraph "React Components"
            G["About.tsx"]:::ui
            H["Approach.tsx"]:::ui
            I["Experience.tsx"]:::ui
            J["Footer.tsx"]:::ui
            K["Hero.tsx"]:::ui
            L["Projects.tsx"]:::ui
            M["Testimonials.tsx"]:::ui
        end
        subgraph "UI Widgets"
            N["BentoGrid.tsx"]:::ui
            O["CanvasRevealEffect.tsx"]:::ui
            P["CopyEmail.tsx"]:::ui
            Q["FloatingNav.tsx"]:::ui
            R["GradientBackground.tsx"]:::ui
            S["GridBackground.tsx"]:::ui
            T["InfiniteMovingCards.tsx"]:::ui
            U["MagicButton.tsx"]:::ui
            V["ModeToggle.tsx"]:::ui
            W["MovingBorders.tsx"]:::ui
            X["PinContainer.tsx"]:::ui
            Y["Spotlight.tsx"]:::ui
            Z["SpotlightBackground.tsx"]:::ui
            AA["TextGenerateEffect.tsx"]:::ui
            AB["button.tsx"]:::ui
            AC["dropdown-menu.tsx"]:::ui
        end
    end

    %% Global Context & State Management
    subgraph "Global Context"
        AD["theme-provider.tsx"]:::context
    end

    %% Data Management
    subgraph "Data Layer"
        AE["confetti.json"]:::data
        AF["globe.json"]:::data
        AG["index.ts"]:::data
    end

    %% Utility Functions
    subgraph "Utility Functions"
        AH["utils.ts"]:::utils
    end

    %% External Integrations (Sentry)
    subgraph "Sentry Integration"
        AI["sentry.client.config.ts"]:::sentry
        AJ["sentry.edge.config.ts"]:::sentry
        AK["sentry.server.config.ts"]:::sentry
    end

    %% Infrastructure & Configuration Files
    subgraph "Infrastructure"
        AL["next.config.mjs"]:::infra
        AM["tailwind.config.ts"]:::infra
        AN["postcss.config.mjs"]:::infra
        AO["tsconfig.json"]:::infra
        AP["site.webmanifest"]:::infra
    end

    %% Relationships / Data flows
    %% Global context feeds Next.js app and UI components
    AD -->|"providesState"| D
    AD -->|"appliesTheme"| K

    %% Data and Utilities feed Next.js App
    AE -->|"feedsData"| D
    AH -->|"helperFunctions"| D

    %% Next.js App renders UI components
    D -->|"rendersComponents"| K

    %% Error monitoring from Next.js App and UI components to Sentry
    D -->|"reportsError"| AI
    K -->|"errorCapture"| AI

    %% Infrastructure config influences Next.js App
    AL -->|"deploymentConfig"| D

    %% Click Events for Next.js App Layer
    click A "https://github.com/adrianrusan/personal-portfolio/blob/main/app/layout.tsx"
    click B "https://github.com/adrianrusan/personal-portfolio/blob/main/app/global-error.jsx"
    click C "https://github.com/adrianrusan/personal-portfolio/blob/main/app/not-found.tsx"
    click D "https://github.com/adrianrusan/personal-portfolio/blob/main/app/page.tsx"
    click E "https://github.com/adrianrusan/personal-portfolio/blob/main/app/robots.ts"
    click F "https://github.com/adrianrusan/personal-portfolio/blob/main/app/sitemap.ts"

    %% Click Events for React Components
    click G "https://github.com/adrianrusan/personal-portfolio/blob/main/components/About.tsx"
    click H "https://github.com/adrianrusan/personal-portfolio/blob/main/components/Approach.tsx"
    click I "https://github.com/adrianrusan/personal-portfolio/blob/main/components/Experience.tsx"
    click J "https://github.com/adrianrusan/personal-portfolio/blob/main/components/Footer.tsx"
    click K "https://github.com/adrianrusan/personal-portfolio/blob/main/components/Hero.tsx"
    click L "https://github.com/adrianrusan/personal-portfolio/blob/main/components/Projects.tsx"
    click M "https://github.com/adrianrusan/personal-portfolio/blob/main/components/Testimonials.tsx"

    %% Click Events for UI Widgets
    click N "https://github.com/adrianrusan/personal-portfolio/blob/main/components/ui/BentoGrid.tsx"
    click O "https://github.com/adrianrusan/personal-portfolio/blob/main/components/ui/CanvasRevealEffect.tsx"
    click P "https://github.com/adrianrusan/personal-portfolio/blob/main/components/ui/CopyEmail.tsx"
    click Q "https://github.com/adrianrusan/personal-portfolio/blob/main/components/ui/FloatingNav.tsx"
    click R "https://github.com/adrianrusan/personal-portfolio/blob/main/components/ui/GradientBackground.tsx"
    click S "https://github.com/adrianrusan/personal-portfolio/blob/main/components/ui/GridBackground.tsx"
    click T "https://github.com/adrianrusan/personal-portfolio/blob/main/components/ui/InfiniteMovingCards.tsx"
    click U "https://github.com/adrianrusan/personal-portfolio/blob/main/components/ui/MagicButton.tsx"
    click V "https://github.com/adrianrusan/personal-portfolio/blob/main/components/ui/ModeToggle.tsx"
    click W "https://github.com/adrianrusan/personal-portfolio/blob/main/components/ui/MovingBorders.tsx"
    click X "https://github.com/adrianrusan/personal-portfolio/blob/main/components/ui/PinContainer.tsx"
    click Y "https://github.com/adrianrusan/personal-portfolio/blob/main/components/ui/Spotlight.tsx"
    click Z "https://github.com/adrianrusan/personal-portfolio/blob/main/components/ui/SpotlightBackground.tsx"
    click AA "https://github.com/adrianrusan/personal-portfolio/blob/main/components/ui/TextGenerateEffect.tsx"
    click AB "https://github.com/adrianrusan/personal-portfolio/blob/main/components/ui/button.tsx"
    click AC "https://github.com/adrianrusan/personal-portfolio/blob/main/components/ui/dropdown-menu.tsx"

    %% Click Event for Global Context
    click AD "https://github.com/adrianrusan/personal-portfolio/blob/main/context/theme-provider.tsx"

    %% Click Events for Data Layer
    click AE "https://github.com/adrianrusan/personal-portfolio/blob/main/data/confetti.json"
    click AF "https://github.com/adrianrusan/personal-portfolio/blob/main/data/globe.json"
    click AG "https://github.com/adrianrusan/personal-portfolio/blob/main/data/index.ts"

    %% Click Event for Utility Functions
    click AH "https://github.com/adrianrusan/personal-portfolio/blob/main/lib/utils.ts"

    %% Click Events for Sentry Integration
    click AI "https://github.com/adrianrusan/personal-portfolio/blob/main/sentry.client.config.ts"
    click AJ "https://github.com/adrianrusan/personal-portfolio/blob/main/sentry.edge.config.ts"
    click AK "https://github.com/adrianrusan/personal-portfolio/blob/main/sentry.server.config.ts"

    %% Click Events for Infrastructure
    click AL "https://github.com/adrianrusan/personal-portfolio/blob/main/next.config.mjs"
    click AM "https://github.com/adrianrusan/personal-portfolio/blob/main/tailwind.config.ts"
    click AN "https://github.com/adrianrusan/personal-portfolio/blob/main/postcss.config.mjs"
    click AO "https://github.com/adrianrusan/personal-portfolio/blob/main/tsconfig.json"
    click AP "https://github.com/adrianrusan/personal-portfolio/blob/main/public/site.webmanifest"

    %% Class definitions for coloring
    classDef app fill:#F9E79F,stroke:#B7950B,stroke-width:2px;
    classDef ui fill:#AED6F1,stroke:#1B4F72,stroke-width:2px;
    classDef context fill:#D5F5E3,stroke:#1E8449,stroke-width:2px;
    classDef data fill:#FADBD8,stroke:#943126,stroke-width:2px;
    classDef utils fill:#D6EAF8,stroke:#2874A6,stroke-width:2px;
    classDef sentry fill:#F5B7B1,stroke:#922B21,stroke-width:2px;
    classDef infra fill:#E8DAEF,stroke:#6C3483,stroke-width:2px;
```
