# venki1402/my-portfolio architecture

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

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

## Overview

##### Main Components
- Next.js Frontend: This is the core of the application. It defines the page routing (in the “app” directory) and uses React components.
- Pages (Routes): In the “app” directory you have several routes (such as contact, experience, hire, projects, resume) plus a global layout and home page (i.e. app/page.jsx and app/layout.jsx). Each directory acting as a sub-route.
- Reusable Components: The “components” directory includes many UI and navigation components (e.g., Header, MobileNav, Nav, DownloadCV, Photo, etc.), and further UI primitives under “components/ui” (button, input, select, etc.).
- Utility/Library Module: The “lib” directory contains helper utilities (lib/utils.js) that support functionality across the app.
- Static Assets: The “public” directory holds assets such as images/projects, used in the UI.
- Configuration & Styling: Configuration files like next.config.mjs, tailwind.config.js, postcss.config.mjs, and global styling in “app/globals.css” (plus ESLint and jsconfig.json) show development process and styling integration.

##### Relationships and Interactions
- The “app” directory routes use the shared layout (app/layout.jsx) to wrap each page view. Each page (e.g. app/contact/page.jsx) renders its content and then uses the shared components (from “components”) such as Header or MobileNav.
- The UI components (in “components/ui”) are integrated into pages or other higher-level components to provide consistent styling and interactivity.
- Utility functions (in “lib”) provide core business logic or operations used across the UI and page components.
- Static assets from “public/assets” are referenced by both pages and components to display media and other static resources.

##### Architectural Patterns and Design Principles
- Component-Based Architecture: Everything is modularized into components with separation between page-level routing and reusable UI elements.
- Next.js File-Based Routing: The “app” directory is organized to represent individual pages and nested routes.
- Single Source of Styling: Global CSS (app/globals.css) combined with Tailwind CSS configuration ensures consistent styles across the application.
- Separation of Concerns: Routing, UI, and utility logic are clearly separated into different directories.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Next.js Application"
        %% Pages & Routing Layer
        subgraph "Pages & Routing (app directory)"
            GlobalLayout["Global Layout: app/layout.jsx"]:::layout
            Home["Home: app/page.jsx"]:::pages
            Contact["Contact: app/contact/page.jsx"]:::pages
            Experience["Experience: app/experience/page.jsx"]:::pages
            Hire["Hire: app/hire/page.jsx"]:::pages
            Projects["Projects: app/projects/page.jsx"]:::pages
            Resume["Resume: app/resume/page.jsx"]:::pages
        end

        %% Reusable Components Layer
        subgraph "Reusable Components"
            Header["Header"]:::reusable
            MobileNav["MobileNav"]:::reusable
            Nav["Nav"]:::reusable
            DownloadCV["DownloadCV"]:::reusable
            Photo["Photo"]:::reusable
            Social["Social"]:::reusable
            PageTransition["PageTransition"]:::reusable
            StairTransition["StairTransition"]:::reusable
            Stairs["Stairs"]:::reusable
            Stats["Stats"]:::reusable
            WorkSliderButtons["WorkSliderButtons"]:::reusable
        end

        %% UI Components Library Layer
        subgraph "UI Components Library"
            Button["Button"]:::ui
            Input["Input"]:::ui
            ScrollArea["Scroll Area"]:::ui
            Select["Select"]:::ui
            Sheet["Sheet"]:::ui
            Tabs["Tabs"]:::ui
            TextArea["TextArea"]:::ui
            Tooltip["Tooltip"]:::ui
        end

        %% Utility Layer
        subgraph "Utilities"
            Utils["Utils (lib/utils.js)"]:::util
        end

        %% Static Assets & Configurations Layer
        subgraph "Static Assets & Configurations"
            Assets["Static Assets (public/assets)"]:::config
            Config["Configurations & Styling"]:::config
        end
    end

    %% Relationships
    GlobalLayout -->|"wraps"| Home
    GlobalLayout -->|"wraps"| Contact
    GlobalLayout -->|"wraps"| Experience
    GlobalLayout -->|"wraps"| Hire
    GlobalLayout -->|"wraps"| Projects
    GlobalLayout -->|"wraps"| Resume

    Home -->|"renders"| Header
    Contact -->|"renders"| Header
    Experience -->|"renders"| Header
    Hire -->|"renders"| Header
    Projects -->|"renders"| Header
    Resume -->|"renders"| Header

    Header -->|"uses"| Button

    GlobalLayout -->|"imports"| Utils
    GlobalLayout -->|"applies"| Config
    GlobalLayout -->|"references"| Assets

    %% Styling Classes
    classDef pages fill:#f9e79f,stroke:#6e2c00,stroke-width:2px;
    classDef layout fill:#fad7a0,stroke:#af601a,stroke-width:2px;
    classDef reusable fill:#aed6f1,stroke:#1b4f72,stroke-width:2px;
    classDef ui fill:#d5f5e3,stroke:#117a65,stroke-width:2px;
    classDef util fill:#f5cba7,stroke:#9c640c,stroke-width:2px;
    classDef config fill:#d7bde2,stroke:#6c3483,stroke-width:2px;

    %% Click Events for Pages & Global Layout
    click GlobalLayout "https://github.com/venki1402/my-portfolio/blob/main/app/layout.jsx"
    click Home "https://github.com/venki1402/my-portfolio/blob/main/app/page.jsx"
    click Contact "https://github.com/venki1402/my-portfolio/blob/main/app/contact/page.jsx"
    click Experience "https://github.com/venki1402/my-portfolio/blob/main/app/experience/page.jsx"
    click Hire "https://github.com/venki1402/my-portfolio/blob/main/app/hire/page.jsx"
    click Projects "https://github.com/venki1402/my-portfolio/blob/main/app/projects/page.jsx"
    click Resume "https://github.com/venki1402/my-portfolio/blob/main/app/resume/page.jsx"

    %% Click Events for Reusable Components
    click Header "https://github.com/venki1402/my-portfolio/blob/main/components/Header.jsx"
    click MobileNav "https://github.com/venki1402/my-portfolio/blob/main/components/MobileNav.jsx"
    click Nav "https://github.com/venki1402/my-portfolio/blob/main/components/Nav.jsx"
    click DownloadCV "https://github.com/venki1402/my-portfolio/blob/main/components/DownloadCV.jsx"
    click Photo "https://github.com/venki1402/my-portfolio/blob/main/components/Photo.jsx"
    click Social "https://github.com/venki1402/my-portfolio/blob/main/components/Social.jsx"
    click PageTransition "https://github.com/venki1402/my-portfolio/blob/main/components/PageTransition.jsx"
    click StairTransition "https://github.com/venki1402/my-portfolio/blob/main/components/StairTransition.jsx"
    click Stairs "https://github.com/venki1402/my-portfolio/blob/main/components/Stairs.jsx"
    click Stats "https://github.com/venki1402/my-portfolio/blob/main/components/Stats.jsx"
    click WorkSliderButtons "https://github.com/venki1402/my-portfolio/blob/main/components/WorkSliderButtons.jsx"

    %% Click Events for UI Components Library
    click Button "https://github.com/venki1402/my-portfolio/blob/main/components/ui/button.jsx"
    click Input "https://github.com/venki1402/my-portfolio/blob/main/components/ui/input.jsx"
    click ScrollArea "https://github.com/venki1402/my-portfolio/blob/main/components/ui/scroll-area.jsx"
    click Select "https://github.com/venki1402/my-portfolio/blob/main/components/ui/select.jsx"
    click Sheet "https://github.com/venki1402/my-portfolio/blob/main/components/ui/sheet.jsx"
    click Tabs "https://github.com/venki1402/my-portfolio/blob/main/components/ui/tabs.jsx"
    click TextArea "https://github.com/venki1402/my-portfolio/blob/main/components/ui/textarea.jsx"
    click Tooltip "https://github.com/venki1402/my-portfolio/blob/main/components/ui/tooltip.jsx"

    %% Click Event for Utilities
    click Utils "https://github.com/venki1402/my-portfolio/blob/main/lib/utils.js"

    %% Click Event for Static Assets
    click Assets "https://github.com/venki1402/my-portfolio/tree/main/public/assets"

    %% Click Event for Configurations & Styling
    click Config "https://github.com/venki1402/my-portfolio/blob/main/next.config.mjs"
```
