# dangpham112000/illustration-portfolio architecture

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

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

## Overview

##### Main Components
- Entry/Build Configuration: Represent configuration files like vite.config.js, tailwind.config.js, package.json, eslint.config.js, and postcss.config.js. These files define the build process, styling, linting, and dependency management.
- Application Core (src Directory): This is the heart of the React application. Create separate sub-components for:
- Main Entry Points: src/main.jsx and src/App.jsx as the launching point of the application.
- Pages: Include each view in the system such as Home, About, Life, Magic, and MagicDetail pages (found in src/pages). These represent the different screens/routes in the application.
- Components: Group the reusable UI components (Navigation, Modal, Sliders, Buttons, etc. in src/components). Show how these components combine to build the UI.
- Context Management: Represent the src/context directory (which appears to manage the NavBar state) as a separate component that provides state management across the application.

##### Relationships and Data Flow
- That the build and configuration layer (Vite, ESLint, Tailwind) compiles and bundles the code from the src directory.
- That the Application Core (UI components, pages, context, and utilities) drives the dynamic behavior of the app.
- That Public Assets are served statically and accessed by components (e.g., image display in galleries or sliders).

##### Architectural Patterns
- Component-based Architecture: The React components are modular and reusable, following the typical “View” layer of an SPA.
- Separation of Concerns: Clearly distinguish between configuration/build tooling, static assets, UI components, state management, and static data.
- Responsive Design: Note that the README hints at various device widths – you may want to add annotations indicating responsiveness (e.g., specific components optimized for mobile vs. tablet).

##### Final Recommendation for the Principal Software Engineer
- Drill down into separating the application into its core UI layers (pages, components, context) while showing how static assets are isolated in the public folder.
- Maintain clarity and simplicity in labeling so that even someone unfamiliar with React/Vite basics can grasp the architectural boundaries and interactions.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Build/Configuration Layer"
        config1["vite.config.js"]
        config2["tailwind.config.js"]
        config3["eslint.config.js"]
        config4["package.json"]
        config5["postcss.config.js"]
    end

    subgraph "Public Assets"
        assets["public directory"]
    end

    subgraph "React Application Core"
        subgraph "Main Entry Points"
            entry1["src/main.jsx"]
            entry2["src/App.jsx"]
        end
        subgraph "Pages"
            page1["Home.jsx"]
            page2["About.jsx"]
            page3["Life.jsx"]
            page4["Magic.jsx"]
            page5["MagicDetail.jsx"]
        end
        subgraph "Reusable Components"
            comp1["Navigation.jsx"]
            comp2["ModalSlider.jsx"]
            comp3["LifeGridIpad.jsx"]
            subgraph "Buttons"
                comp4["ArrowDown.jsx"]
                comp5["ArrowUp.jsx"]
                comp6["ScrollToTopButton.jsx"]
                comp7["socialIcon.jsx"]
            end
        end
        subgraph "State/Context Management"
            context1["NavBarContext.jsx"]
        end
        subgraph "Data & Utilities"
            data1["lifeImages.js"]
            data2["magicCollection.js"]
            data3["menuList.js"]
            util1["colorToRGBA.js"]
            util2["getCurrentHashPath.js"]
            util3["getCurrentPath.js"]
        end
    end

    %% Relationships / Data Flow
    config1 --> entry1
    entry1 --> entry2
    entry2 --> page1
    entry2 --> comp1
    context1 --> comp1
    assets --> page1
    assets --> comp1
    data1 --> page1
    util1 --> comp1

    %% Class Styles
    classDef config fill:#f9d,stroke:#333,stroke-width:2px;
    classDef assets fill:#bbf,stroke:#333,stroke-width:2px;
    classDef entry fill:#afa,stroke:#333,stroke-width:2px;
    classDef pages fill:#ffd,stroke:#333,stroke-width:2px;
    classDef comps fill:#fcf,stroke:#333,stroke-width:2px;
    classDef context fill:#cfc,stroke:#333,stroke-width:2px;
    classDef data fill:#def,stroke:#333,stroke-width:2px;

    class config1,config2,config3,config4,config5 config;
    class assets assets;
    class entry1,entry2 entry;
    class page1,page2,page3,page4,page5 pages;
    class comp1,comp2,comp3,comp4,comp5,comp6,comp7 comps;
    class context1 context;
    class data1,data2,data3,util1,util2,util3 data;

    %% Click Events
    click config1 "https://github.com/dangpham112000/illustration-portfolio/blob/main/vite.config.js"
    click config2 "https://github.com/dangpham112000/illustration-portfolio/blob/main/tailwind.config.js"
    click config3 "https://github.com/dangpham112000/illustration-portfolio/blob/main/eslint.config.js"
    click config4 "https://github.com/dangpham112000/illustration-portfolio/blob/main/package.json"
    click config5 "https://github.com/dangpham112000/illustration-portfolio/blob/main/postcss.config.js"
    click assets "https://github.com/dangpham112000/illustration-portfolio/tree/main/public"
    click entry1 "https://github.com/dangpham112000/illustration-portfolio/blob/main/src/main.jsx"
    click entry2 "https://github.com/dangpham112000/illustration-portfolio/blob/main/src/App.jsx"
    click page1 "https://github.com/dangpham112000/illustration-portfolio/blob/main/src/pages/Home.jsx"
    click page2 "https://github.com/dangpham112000/illustration-portfolio/blob/main/src/pages/About.jsx"
    click page3 "https://github.com/dangpham112000/illustration-portfolio/blob/main/src/pages/Life.jsx"
    click page4 "https://github.com/dangpham112000/illustration-portfolio/blob/main/src/pages/Magic.jsx"
    click page5 "https://github.com/dangpham112000/illustration-portfolio/blob/main/src/pages/MagicDetail.jsx"
    click comp1 "https://github.com/dangpham112000/illustration-portfolio/blob/main/src/components/Navigation.jsx"
    click comp2 "https://github.com/dangpham112000/illustration-portfolio/blob/main/src/components/ModalSlider.jsx"
    click comp3 "https://github.com/dangpham112000/illustration-portfolio/blob/main/src/components/LifeGridIpad.jsx"
    click comp4 "https://github.com/dangpham112000/illustration-portfolio/blob/main/src/components/button/ArrowDown.jsx"
    click comp5 "https://github.com/dangpham112000/illustration-portfolio/blob/main/src/components/button/ArrowUp.jsx"
    click comp6 "https://github.com/dangpham112000/illustration-portfolio/blob/main/src/components/button/ScrollToTopButton.jsx"
    click comp7 "https://github.com/dangpham112000/illustration-portfolio/blob/main/src/components/button/socialIcon.jsx"
    click context1 "https://github.com/dangpham112000/illustration-portfolio/blob/main/src/context/NavBarContext.jsx"
    click data1 "https://github.com/dangpham112000/illustration-portfolio/blob/main/src/data/lifeImages.js"
    click data2 "https://github.com/dangpham112000/illustration-portfolio/blob/main/src/data/magicCollection.js"
    click data3 "https://github.com/dangpham112000/illustration-portfolio/blob/main/src/data/menuList.js"
    click util1 "https://github.com/dangpham112000/illustration-portfolio/blob/main/src/utils/colorToRGBA.js"
    click util2 "https://github.com/dangpham112000/illustration-portfolio/blob/main/src/utils/getCurrentHashPath.js"
    click util3 "https://github.com/dangpham112000/illustration-portfolio/blob/main/src/utils/getCurrentPath.js"
```
