# willpower0304/portfolio architecture

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

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

## Overview

##### Main Components
- Frontend Framework: The project is entirely a client-side React application.
- Main Layout & Entry Points:
- index.html (in the root) which bootstraps the application.
- src/main.jsx and src/App.jsx which serve as the main entry points for the React component tree.
- Components: The src/components directory is organized into distinct areas such as About, Contact, Experience, Hero, Navbar, and Projects. Each component is paired with its respective CSS module.
- Assets: The assets directory contains images and other static files that support the visual sections of the portfolio.
- Data Sources: The src/data directory holds JSON files (projects.json and skills.json), signaling a data-driven approach for rendering lists of projects and skills.
- Utility and Configuration Files: Files like vite.config.js, package.json, and .eslintrc.cjs provide build, dependency, and linting configurations.

##### Relationships and Interactions
- The entry in index.html loads the bundled script generated by Vite.
- main.jsx renders the App.jsx component, which encompasses the entire page.
- App.jsx acts as the container that orchestrates and integrates the various view components (Hero, Navbar, About, Experience, Projects, Contact).
- Each component imports its own CSS module for styling and may also consume data from the JSON files in src/data.
- There’s a separation of concerns: static content (assets), dynamic content (data in JSON), and reusable view logic (React components).

##### Architectural Patterns and Design Principles
- Component-based Architecture: The project clearly follows a modular design pattern where each section of the portfolio is encapsulated as its own component.
- Separation of Concerns: Presentation (JSX), styling (CSS Modules), and data (JSON files) are neatly separated.
- Clear Import Dependencies: Utility functions (src/utils.js) and variable definitions (src/vars.css) indicate common/shared resources.

##### Key Technologies
- React for building user interfaces.
- Vite as the build and bundling tool for rapid development.
- CSS Modules for component-scoped styling.
- JSON files for data management to dynamically render content.
- ESLint for code quality standards and configuration files for development processes.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Entry and Bootstrap
    subgraph "Entry and Bootstrap"
        E1["index.html"]:::entry
        E2["main.jsx"]:::entry
        E3["App.jsx"]:::entry
        E1 -->|"loads"| E2
        E2 -->|"renders"| E3
    end

    %% UI Components
    subgraph "UI Components"
        C1["About (About.jsx)"]:::component
        C2["Contact (Contact.jsx)"]:::component
        C3["Experience (Experience.jsx)"]:::component
        C4["Hero (Hero.jsx)"]:::component
        C5["Navbar (Navbar.jsx)"]:::component
        C6["Projects (Projects.jsx)"]:::component
        C7["ProjectCard (ProjectCard.jsx)"]:::component
    end

    %% Static Assets
    subgraph "Static Assets"
        A["Assets"]:::asset
    end

    %% Data Sources (JSON)
    subgraph "Data Sources (JSON)"
        D1["projects.json"]:::data
        D2["skills.json"]:::data
    end

    %% Utilities and Configurations
    subgraph "Utilities & Config"
        U1["Utils (utils.js)"]:::utility
        U2["Vars (vars.css)"]:::utility
        U3["App Styles (App.module.css)"]:::utility
        CFG1["vite.config.js"]:::config
        CFG2["package.json"]:::config
        CFG3[".eslintrc.cjs"]:::config
    end

    %% Connections from App container to UI components
    E3 -->|"renders"| C1
    E3 -->|"renders"| C2
    E3 -->|"renders"| C3
    E3 -->|"renders"| C4
    E3 -->|"renders"| C5
    E3 -->|"renders"| C6
    E3 -->|"renders"| C7

    %% Data flow connections
    D1 -->|"providesData"| C6
    D2 -->|"providesData"| C4

    %% Assets usage by UI components
    A -- "assetsUsed" --> C1
    A -- "assetsUsed" --> C2
    A -- "assetsUsed" --> C3
    A -- "assetsUsed" --> C4
    A -- "assetsUsed" --> C5
    A -- "assetsUsed" --> C6
    A -- "assetsUsed" --> C7

    %% Utilities used by App container
    E3 --- U1
    E3 --- U2
    E3 --- U3

    %% Configurations linked from Bootstrap
    E2 --- CFG1
    E2 --- CFG2
    E2 --- CFG3

    %% Click Events
    click E1 "https://github.com/willpower0304/portfolio/blob/main/index.html"
    click E2 "https://github.com/willpower0304/portfolio/blob/main/src/main.jsx"
    click E3 "https://github.com/willpower0304/portfolio/blob/main/src/App.jsx"
    click C1 "https://github.com/willpower0304/portfolio/blob/main/src/components/About/About.jsx"
    click C2 "https://github.com/willpower0304/portfolio/blob/main/src/components/Contact/Contact.jsx"
    click C3 "https://github.com/willpower0304/portfolio/blob/main/src/components/Experience/Experience.jsx"
    click C4 "https://github.com/willpower0304/portfolio/blob/main/src/components/Hero/Hero.jsx"
    click C5 "https://github.com/willpower0304/portfolio/blob/main/src/components/Navbar/Navbar.jsx"
    click C6 "https://github.com/willpower0304/portfolio/blob/main/src/components/Projects/Projects.jsx"
    click C7 "https://github.com/willpower0304/portfolio/blob/main/src/components/Projects/ProjectCard.jsx"
    click A "https://github.com/willpower0304/portfolio/tree/main/assets"
    click D1 "https://github.com/willpower0304/portfolio/blob/main/src/data/projects.json"
    click D2 "https://github.com/willpower0304/portfolio/blob/main/src/data/skills.json"
    click U1 "https://github.com/willpower0304/portfolio/blob/main/src/utils.js"
    click U2 "https://github.com/willpower0304/portfolio/blob/main/src/vars.css"
    click U3 "https://github.com/willpower0304/portfolio/blob/main/src/App.module.css"
    click CFG1 "https://github.com/willpower0304/portfolio/blob/main/vite.config.js"
    click CFG2 "https://github.com/willpower0304/portfolio/blob/main/package.json"
    click CFG3 "https://github.com/willpower0304/portfolio/blob/main/.eslintrc.cjs"

    %% Styling
    classDef entry fill:#A3E4D7,stroke:#1D8348,stroke-width:2px;
    classDef component fill:#FAD7A0,stroke:#D35400,stroke-width:2px;
    classDef asset fill:#D2B4DE,stroke:#8E44AD,stroke-width:2px;
    classDef data fill:#AED6F1,stroke:#2874A6,stroke-width:2px;
    classDef utility fill:#F5B7B1,stroke:#C0392B,stroke-width:2px;
    classDef config fill:#E8DAEF,stroke:#8E44AD,stroke-width:2px;
```
