# jordanhilado/portfolio-website architecture

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

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

## Overview

##### Main Components
- Next.js Application Shell:
- Core Next.js “app” directory as the heart of your application (found in src/app). This is where the layout and routing are defined (layout.tsx and page.tsx).
- UI Components Layer:
- A component layer that contains reusable UI elements (components/ui/) and global/component-level providers (e.g., theme-provider.tsx, mode-toggle.tsx).
- Assets and Static Files:
- Location for static assets (public folder and src/assets) where resources (images, PDF resumes, fonts, etc.) reside.
- Utility and Library Functions:
- Utils in src/lib which provide helper methods and shared logic across the application.
- Configuration and Build Tooling:
- Configuration files (e.g., next.config.js, tailwind.config.ts, tsconfig.json, postcss.config.js) as they influence the behavior of the build, styling, and type-checking processes.
- External Services and Deployment:
- Although not extensive, include a note about deployment practices (as suggested in the README – “Deploy on Vercel”) and integration points such as Next.js API routes (if used in future expansion).

##### Relationships and Interactions
- Routing and Page Rendering:
- Component Composition:
- Link high-level layout components with nested UI components found under src/components/ui, illustrating that these elements are nested to form pages.
- Static Assets and Data Flow:
- Use of static assets from the public folder and dynamic data or utility functions from src/assets/data.ts or src/lib/utils.ts that feed into component rendering.
- Dependency on Third-Party Libraries:
- How Next.js, Tailwind CSS, and other libraries (as seen from configuration files) are integrated and affect the overall system.

##### Architectural Patterns and Design Principles
- Convention over Configuration:
- The project leverages Next.js’s opinionated structure for improved developer experience.
- Component-based Design:
- That UI is built as composable and modular units (components paired with a theme provider for state and style management).
- Declarative Data Flow:

##### Detail Level
- Be very detailed and capture the essential architectural elements:
- Separate out each component into as many logical parts as possible.
- Including potential state management handled in the theme provider or other hooks if applicable.
- Custom utilities or integrations that are unique to this project structure.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Global Entities
    UserRequest["User Request"]:::external

    %% Next.js Application Shell
    subgraph "Next.js Application Shell"
        Layout["Layout (src/app/layout.tsx)"]:::app
        Page["Page (src/app/page.tsx)"]:::app
    end

    %% UI Components Layer
    subgraph "UI Components Layer"
        %% Reusable UI Components
        subgraph "Reusable UI Components"
            Avatar["Avatar"]:::ui
            Badge["Badge"]:::ui
            Button["Button"]:::ui
            Card["Card"]:::ui
            Command["Command"]:::ui
            Dialog["Dialog"]:::ui
            Dropdown["Dropdown Menu"]:::ui
            Section["Section"]:::ui
        end
        %% Global Providers
        subgraph "Global Providers"
            ModeToggle["Mode Toggle"]:::provider
            ThemeProvider["Theme Provider"]:::provider
        end
    end

    %% Assets and Static Files
    subgraph "Assets and Static Files"
        Public["Public Folder"]:::assets
        PublicFonts["Public Fonts"]:::assets
        Assets["Assets Folder"]:::assets
        Data["Data (src/assets/data.ts)"]:::assets
        Resume["Resume Files"]:::assets
    end

    %% Utility and Library Functions
    subgraph "Utility and Library Functions"
        Utils["Utils (src/lib/utils.ts)"]:::util
    end

    %% Configuration and Build Tooling
    subgraph "Configuration and Build Tooling"
        NextConfig["Next Config"]:::config
        TailwindConfig["Tailwind Config"]:::config
        TSConfig["TS Config"]:::config
        PostCSSConfig["PostCSS Config"]:::config
        ESLint["ESLint Config"]:::config
    end

    %% External Deployment
    Vercel["Deploy on Vercel"]:::external

    %% Relationships and Data Flow
    UserRequest -->|"triggers"| Layout
    Layout -->|"renders"| Page

    %% Composition and Usage
    Page -->|"composes"| Avatar
    Page -->|"composes"| Badge
    Page -->|"composes"| Button
    Page -->|"composes"| Card
    Page -->|"composes"| Command
    Page -->|"composes"| Dialog
    Page -->|"composes"| Dropdown
    Page -->|"composes"| Section
    Page -->|"utilizes"| ModeToggle
    Page -->|"utilizes"| ThemeProvider

    Public -->|"serves"| Page
    PublicFonts -->|"serves"| Page
    Assets -->|"serves"| Page
    Data -->|"feeds"| Page
    Resume -->|"feeds"| Page

    Utils -->|"provides"| Page

    NextConfig -->|"configures"| Page
    TailwindConfig -->|"configures"| Page
    TSConfig -->|"configures"| Page
    PostCSSConfig -->|"configures"| Page
    ESLint -->|"configures"| Page

    Page -->|"deployed_on"| Vercel

    %% Click Events for Next.js Application Shell
    click Layout "https://github.com/jordanhilado/portfolio-website/blob/main/src/app/layout.tsx"
    click Page "https://github.com/jordanhilado/portfolio-website/blob/main/src/app/page.tsx"

    %% Click Events for UI Components (src/components/ui)
    click Avatar "https://github.com/jordanhilado/portfolio-website/blob/main/src/components/ui/avatar.tsx"
    click Badge "https://github.com/jordanhilado/portfolio-website/blob/main/src/components/ui/badge.tsx"
    click Button "https://github.com/jordanhilado/portfolio-website/blob/main/src/components/ui/button.tsx"
    click Card "https://github.com/jordanhilado/portfolio-website/blob/main/src/components/ui/card.tsx"
    click Command "https://github.com/jordanhilado/portfolio-website/blob/main/src/components/ui/command.tsx"
    click Dialog "https://github.com/jordanhilado/portfolio-website/blob/main/src/components/ui/dialog.tsx"
    click Dropdown "https://github.com/jordanhilado/portfolio-website/blob/main/src/components/ui/dropdown-menu.tsx"
    click Section "https://github.com/jordanhilado/portfolio-website/blob/main/src/components/ui/section.tsx"

    %% Click Events for Global Providers
    click ModeToggle "https://github.com/jordanhilado/portfolio-website/blob/main/src/components/mode-toggle.tsx"
    click ThemeProvider "https://github.com/jordanhilado/portfolio-website/blob/main/src/components/theme-provider.tsx"

    %% Click Events for Assets and Static Files
    click Public "https://github.com/jordanhilado/portfolio-website/tree/main/public"
    click PublicFonts "https://github.com/jordanhilado/portfolio-website/tree/main/public/fonts"
    click Data "https://github.com/jordanhilado/portfolio-website/blob/main/src/assets/data.ts"
    click Resume "https://github.com/jordanhilado/portfolio-website/tree/main/src/assets/resume"

    %% Click Event for Utility Function
    click Utils "https://github.com/jordanhilado/portfolio-website/blob/main/src/lib/utils.ts"

    %% Click Events for Configuration Files
    click NextConfig "https://github.com/jordanhilado/portfolio-website/blob/main/next.config.js"
    click TailwindConfig "https://github.com/jordanhilado/portfolio-website/blob/main/tailwind.config.ts"
    click TSConfig "https://github.com/jordanhilado/portfolio-website/blob/main/tsconfig.json"
    click PostCSSConfig "https://github.com/jordanhilado/portfolio-website/blob/main/postcss.config.js"
    click ESLint "https://github.com/jordanhilado/portfolio-website/blob/main/.eslintrc.json"

    %% Styles
    classDef external fill:#e0f7fa,stroke:#000,stroke-width:1px;
    classDef app fill:#e3f2fd,stroke:#000,stroke-width:1px;
    classDef ui fill:#e8f5e9,stroke:#000,stroke-width:1px;
    classDef provider fill:#c8e6c9,stroke:#000,stroke-width:1px;
    classDef assets fill:#fff3e0,stroke:#000,stroke-width:1px;
    classDef util fill:#f3e5f5,stroke:#000,stroke-width:1px;
    classDef config fill:#ffebee,stroke:#000,stroke-width:1px;
```
