# marcoapunto/portfolio architecture

> Architecture diagram of the GitHub repository marcoapunto/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/marcoapunto/portfolio
- Repository: https://github.com/marcoapunto/portfolio

## Overview

##### Main Components
- Client-Side Application: The entire application is a React single-page application (SPA).
- Entry Point & Configuration:
- index.html (the root HTML that loads the SPA)
- main.jsx (initializes the React app)
- Vite and package.json (configure and manage dependencies)
- The App Structure:
- src/App.jsx (acts as the main container/component)
- Individual components under src/components, such as Header.jsx, Skills.jsx, Projects.jsx, and Contact.jsx which provide distinct sections of the portfolio.
- Styling and Animations:
- Tailwind CSS (utility-first styling approach; use of src/index.css and Tailwind configuration within the project)
- Framer Motion (for component animations integrated directly within the components)

##### Component Relationships and Data Flow
- main.jsx renders App.jsx, which in turn orchestrates the display of each individual component.
- From main.jsx to App.jsx (entry flow)
- From App.jsx to each of the child components (Header, Skills, Projects, and Contact)
- A side note for styling:

##### Important Architectural Patterns and Principles
- Component-Based Architecture: Emphasize that the project is built around reusable and modular components. Each component (like Header or Projects) encapsulates its own UI logic and styling.
- Utility-First Styling: Show a connection between React components and Tailwind’s utility classes, reinforcing that styling is achieved via pre-defined classes, streamlining responsive design.
- Separation of Concerns: Illustrate that layout (HTML structure), logic (React components), and styling (Tailwind CSS, animations with Framer Motion) are modularized to promote maintainability.

## Diagram (Mermaid)

```mermaid
graph TD
    %% Entry & Configuration Subgraph
    subgraph "Entry & Configuration"
        A1["index.html (Entry HTML)"]
        A2["main.jsx (Entry Script)"]
        A3["package.json (Config File)"]
        A4["vite.config.js (Config File)"]
        A1 --> A2
        A3 --> A2
        A4 --> A2
    end

    %% App Container Subgraph
    subgraph "App Container"
        B1["App Component"]
        B2["Header Component"]
        B3["Skills Component"]
        B4["Projects Component"]
        B5["Contact Component"]
        B1 --> B2
        B1 --> B3
        B1 --> B4
        B1 --> B5
    end

    %% External Tools and Styling
    E1["Tailwind CSS"]
    E2["Global Styles"]
    E3["Framer Motion"]
    E4["Vite (Bundler)"]

    %% Relationships for External Tools
    E1 --> E2
    E2 --> B2
    E2 --> B3
    E2 --> B4
    E2 --> B5
    E3 --> B2
    E3 --> B3
    E3 --> B4
    E3 --> B5
    E4 --> A2

    %% Application Flow
    A2 --> B1

    %% Legend Subgraph
    subgraph "Legend"
        L1["Configuration/Entry (Yellow)"]
        L2["React Components (Blue)"]
        L3["External Tools (Green)"]
    end

    %% Click Events
    click A1 "https://github.com/marcoapunto/portfolio/blob/main/index.html"
    click A2 "https://github.com/marcoapunto/portfolio/blob/main/src/main.jsx"
    click A3 "https://github.com/marcoapunto/portfolio/blob/main/package.json"
    click A4 "https://github.com/marcoapunto/portfolio/blob/main/vite.config.js"
    click B1 "https://github.com/marcoapunto/portfolio/blob/main/src/App.jsx"
    click B2 "https://github.com/marcoapunto/portfolio/blob/main/src/components/Header.jsx"
    click B3 "https://github.com/marcoapunto/portfolio/blob/main/src/components/Skills.jsx"
    click B4 "https://github.com/marcoapunto/portfolio/blob/main/src/components/Projects.jsx"
    click B5 "https://github.com/marcoapunto/portfolio/blob/main/src/components/Contact.jsx"
    click E2 "https://github.com/marcoapunto/portfolio/blob/main/src/index.css"

    %% Styles
    class A1,A2,A3,A4 config
    class B1,B2,B3,B4,B5 component
    class E1,E2,E3,E4 external

    %% Class Definitions for Colours
    classDef config fill:#f9e79f,stroke:#d4ac0d,stroke-width:2px;
    classDef component fill:#aed6f1,stroke:#2471a3,stroke-width:2px;
    classDef external fill:#d5f5e3,stroke:#28b463,stroke-width:2px;
```
