# emmanuelldev/emman-portfolio architecture

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

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

## Overview

##### Main Components
- Frontend (Next.js App): This is represented by the "app" directory where different pages (e.g., app/page.jsx, app/contact/page.jsx, app/resume/page.jsx, app/services/page.jsx, app/work/page.jsx) are defined as route-based React components.
- UI/Shared Components: The "components" directory (and its subdirectory "components/ui") includes reusable UI elements such as Header, MobileNav, Nav, and various custom transition components (StairTransition, PageTransition, etc.). These are key to the user interface layer.
- Utilities & Helpers: The "lib" directory shows utility functions (e.g., lib/utils.js) that support business logic or helper routines.
- Configuration and Tooling: Files like next.config.mjs, tailwind.config.js, postcss.config.mjs, .eslintrc.json, and package.json indicate build configuration, styling (Tailwind CSS), linting, and dependency management.
- Static Assets: The "public" directory holds static files like the resume.pdf and any other public assets.
- Project Metadata: Files such as README.md and jsconfig.json help set up the development environment and provide project documentation.

##### Relationships and Interactions
- Routing and Page Components (in "app") serve as the entry points for different views in the application. Each page likely uses various shared components (from "components" and "components/ui") to build the user interface.
- The UI components communicate user events and possibly state changes back to the page-level components.
- The “lib” utilities are consumed by these pages or components to perform common tasks or computations.
- Global configuration files (e.g., next.config.mjs) determine how the application is built and deployed, while Tailwind and PostCSS manage the styling.
- There is an underlying dependency flow via the package manager (npm/yarn/pnpm) where packages are installed as defined in package.json, ensuring that all components and utilities interoperate correctly.

##### Architectural Patterns and Design Principles
- File-Based Routing: The "app" directory leverages Next.js’s modern file-based routing system.
- Component-Based Architecture: Reusable and modular components are defined under "components" and "components/ui", reflecting the React paradigm.
- Separation of Concerns: Distinct directories (app, components, lib, public, etc.) ensure that different functions of the application (view rendering, business logic, configuration, static assets) are separated.
- Configuration Centralization: Common configurations related to build and development are centralized (e.g., in next.config.mjs, tailwind.config.js).

##### Relevant Technologies and Frameworks Highlighted
- Next.js: The framework providing routing, SSR/SSG, and overall application structure.
- React: Underlying library used to create UI components.
- Tailwind CSS: Used for styling as indicated by tailwind.config.js.
- ESLint & PostCSS: Linting and CSS processing configurations.
- Various UI Components: Custom transitions, navigation, and form components that improve application interactivity.

##### Final Advice
- Detail is key – capture how the frontend pages interact with shared UI and helper functionalities.
- File-based routing by grouping together pages that share similar responsibilities.
- Modularity of components and the clear separation of concerns that is typical in modern React/Next.js projects.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontend Pages (Next.js App)
    subgraph "Frontend Pages (Next.js App)"
        home["Home (app/page.jsx)"]
        contact["Contact (app/contact/page.jsx)"]
        resume["Resume (app/resume/page.jsx)"]
        services["Services (app/services/page.jsx)"]
        work["Work (app/work/page.jsx)"]
    end

    %% UI/Shared Components and UI Specific Components
    subgraph "UI/Shared Components"
        header["Header (components/Header.jsx)"]
        mobileNav["MobileNav (components/MobileNav.jsx)"]
        nav["Nav (components/Nav.jsx)"]
        pageTransition["PageTransition (components/PageTransition.jsx)"]
        photo["Photo (components/Photo.jsx)"]
        social["Social (components/Social.jsx)"]
        stairTransition["StairTransition (components/StairTransition.jsx)"]
        stairs["Stairs (components/Stairs.jsx)"]
        stats["Stats (components/Stats.jsx)"]
        workSliderBtns["WorkSliderBtns (components/WorkSliderBtns.jsx)"]
        
        subgraph "UI Specific Components"
            uiButton["Button (components/ui/button.jsx)"]
            uiInput["Input (components/ui/input.jsx)"]
            uiScrollArea["ScrollArea (components/ui/scroll-area.jsx)"]
            uiSelect["Select (components/ui/select.jsx)"]
            uiSheet["Sheet (components/ui/sheet.jsx)"]
            uiTabs["Tabs (components/ui/tabs.jsx)"]
            uiTextarea["Textarea (components/ui/textarea.jsx)"]
            uiTooltip["Tooltip (components/ui/tooltip.jsx)"]
        end
    end

    %% Utilities & Helpers
    subgraph "Utilities & Helpers"
        utils["Utils (lib/utils.js)"]
    end

    %% Configuration & Tooling
    subgraph "Configuration & Tooling"
        nextConfig["Next.js Config (next.config.mjs)"]
        tailwindConfig["Tailwind Config (tailwind.config.js)"]
        postcssConfig["PostCSS Config (postcss.config.mjs)"]
        eslintConf["ESLint ( .eslintrc.json)"]
        packageManagement["Package Management (package.json, package-lock.json)"]
        jsconfigNode["JSConfig (jsconfig.json)"]
    end

    %% Static Assets
    subgraph "Static Assets"
        publicAssets["Public Assets (public)"]
    end

    %% Project Metadata
    subgraph "Project Metadata"
        readme["README.md"]
        gitignore[".gitignore"]
        componentsJson["components.json"]
    end

    %% Connections between Frontend Pages and UI/Shared Components
    home -->|"renders"| header
    contact -->|"renders"| nav
    resume -->|"renders"| pageTransition
    services -->|"renders"| mobileNav
    work -->|"renders"| stairs

    %% Connections from Pages to Utilities and Assets
    home -->|"calls"| utils
    resume -->|"references"| publicAssets

    %% Connections within UI Components
    header -->|"composes"| uiButton
    nav -->|"uses"| uiInput
    pageTransition -->|"incorporates"| uiTooltip

    %% Connections from Configuration to Frontend Pages and Utilities
    nextConfig -->|"configures"| home
    tailwindConfig -->|"styles"| header
    packageManagement -->|"manages"| utils

    %% Class Definitions for Colors
    classDef pages fill:#f9c,stroke:#333,stroke-width:2px;
    classDef components fill:#ccf,stroke:#333,stroke-width:2px;
    classDef ui fill:#ddf,stroke:#333,stroke-width:2px;
    classDef utilities fill:#cff,stroke:#333,stroke-width:2px;
    classDef config fill:#fcf,stroke:#333,stroke-width:2px;
    classDef assets fill:#ffc,stroke:#333,stroke-width:2px;
    classDef metadata fill:#cfc,stroke:#333,stroke-width:2px;

    %% Assigning classes to nodes
    class home,contact,resume,services,work pages;
    class header,mobileNav,nav,pageTransition,photo,social,stairTransition,stairs,stats,workSliderBtns components;
    class uiButton,uiInput,uiScrollArea,uiSelect,uiSheet,uiTabs,uiTextarea,uiTooltip ui;
    class utils utilities;
    class nextConfig,tailwindConfig,postcssConfig,eslintConf,packageManagement,jsconfigNode config;
    class publicAssets assets;
    class readme,gitignore,componentsJson metadata;

    %% Click Events for Frontend Pages
    click home "https://github.com/emmanuelldev/emman-portfolio/blob/main/app/page.jsx"
    click contact "https://github.com/emmanuelldev/emman-portfolio/blob/main/app/contact/page.jsx"
    click resume "https://github.com/emmanuelldev/emman-portfolio/blob/main/app/resume/page.jsx"
    click services "https://github.com/emmanuelldev/emman-portfolio/blob/main/app/services/page.jsx"
    click work "https://github.com/emmanuelldev/emman-portfolio/blob/main/app/work/page.jsx"

    %% Click Events for UI/Shared Components
    click header "https://github.com/emmanuelldev/emman-portfolio/blob/main/components/Header.jsx"
    click mobileNav "https://github.com/emmanuelldev/emman-portfolio/blob/main/components/MobileNav.jsx"
    click nav "https://github.com/emmanuelldev/emman-portfolio/blob/main/components/Nav.jsx"
    click pageTransition "https://github.com/emmanuelldev/emman-portfolio/blob/main/components/PageTransition.jsx"
    click photo "https://github.com/emmanuelldev/emman-portfolio/blob/main/components/Photo.jsx"
    click social "https://github.com/emmanuelldev/emman-portfolio/blob/main/components/Social.jsx"
    click stairTransition "https://github.com/emmanuelldev/emman-portfolio/blob/main/components/StairTransition.jsx"
    click stairs "https://github.com/emmanuelldev/emman-portfolio/blob/main/components/Stairs.jsx"
    click stats "https://github.com/emmanuelldev/emman-portfolio/blob/main/components/Stats.jsx"
    click workSliderBtns "https://github.com/emmanuelldev/emman-portfolio/blob/main/components/WorkSliderBtns.jsx"

    %% Click Events for UI Specific Components
    click uiButton "https://github.com/emmanuelldev/emman-portfolio/blob/main/components/ui/button.jsx"
    click uiInput "https://github.com/emmanuelldev/emman-portfolio/blob/main/components/ui/input.jsx"
    click uiScrollArea "https://github.com/emmanuelldev/emman-portfolio/blob/main/components/ui/scroll-area.jsx"
    click uiSelect "https://github.com/emmanuelldev/emman-portfolio/blob/main/components/ui/select.jsx"
    click uiSheet "https://github.com/emmanuelldev/emman-portfolio/blob/main/components/ui/sheet.jsx"
    click uiTabs "https://github.com/emmanuelldev/emman-portfolio/blob/main/components/ui/tabs.jsx"
    click uiTextarea "https://github.com/emmanuelldev/emman-portfolio/blob/main/components/ui/textarea.jsx"
    click uiTooltip "https://github.com/emmanuelldev/emman-portfolio/blob/main/components/ui/tooltip.jsx"

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

    %% Click Events for Configuration & Tooling
    click nextConfig "https://github.com/emmanuelldev/emman-portfolio/blob/main/next.config.mjs"
    click tailwindConfig "https://github.com/emmanuelldev/emman-portfolio/blob/main/tailwind.config.js"
    click postcssConfig "https://github.com/emmanuelldev/emman-portfolio/blob/main/postcss.config.mjs"
    click eslintConf "https://github.com/emmanuelldev/emman-portfolio/blob/main/.eslintrc.json"
    click packageManagement "https://github.com/emmanuelldev/emman-portfolio/blob/main/package.json"
    click jsconfigNode "https://github.com/emmanuelldev/emman-portfolio/blob/main/jsconfig.json"

    %% Click Event for Static Assets
    click publicAssets "https://github.com/emmanuelldev/emman-portfolio/tree/main/public"

    %% Click Events for Project Metadata
    click readme "https://github.com/emmanuelldev/emman-portfolio/blob/main/README.md"
    click gitignore "https://github.com/emmanuelldev/emman-portfolio/blob/main/.gitignore"
    click componentsJson "https://github.com/emmanuelldev/emman-portfolio/blob/main/components.json"
```
