# thiago186/portfoliov2 architecture

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

- Interactive diagram: https://gitdiagram.com/thiago186/portfoliov2
- Repository: https://github.com/thiago186/portfoliov2

## Overview

##### Project Type Analysis
This is a single-page application (SPA) built using React and Vite, focusing entirely on the frontend. The structure suggests it's likely a portfolio or personal website, given components like ProjectCard, AboutMePage, and ContactMePage.

##### Main Components

A. Application Layer (Top Level)
- Vite Development Server
- React Application Root
- Static Assets (public folder)

B. Core Application Structure
- Router Layer
- Pages Layer
- Components Layer
- Styles Layer

##### Layer Organization (Top to Bottom)

- ┌──────────────────────────────────────────┐
- Vite Dev Server               │
- ┤
- React App                  │
- ┌────────────────────────────────────┐  │
- Router Layer             │  │

- ┌─────────────┐   ┌─────────────┐│  │
- Pages      │   │ Components  ││  │
- Home       │   │ -Navbar     ││  │
- About      │   │ -ProjectCard││  │
- Projects   │   │ -SkillCard  ││  │
- Contact    │   │ -Title      ││  │
- ┘   └─────────────┘│  │

- ┌─────────────┐                  │  │
- Styles    │                  │  │
- Global     │                  │  │
- Variables  │                  │  │
- ┘                  │  │
- ┘  │

- ┌────────────────┐                     │
- Static Assets │                     │
- (public)    │                     │
- ┘                     │
- ┘

- Router → Pages (navigation flow)
- Pages → Components (component composition)
- Styles → Components (styling application)
- Components → Static Assets (resource usage)

##### Important Details
- HMR (Hot Module Replacement) connection
- Component relationships
- Style inheritance paths
- Public asset accessibility

##### Component Hierarchy
- How Navbar is a top-level component
- How components like ProjectCard, SkillCard are used within pages
- Demonstrate the relationship between pages and their respective components

##### Asset Management
- Style sheet relationships with components

##### Build/Deploy Configuration
- Vite configuration relevance
- Docker container boundary if deployment is containerized

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Infrastructure
        ViteServer["Vite Dev Server"]
        ReactApp["React Application"]
    end

    subgraph Application
        Router["Router Layer"]
        
        subgraph Pages
            HomePage["Home Page"]
            AboutPage["About Page"]
            ProjectsPage["Projects Page"]
            ContactPage["Contact Page"]
        end
        
        subgraph Components
            Navbar["Navbar"]
            ProjectCard["Project Card"]
            SkillCard["Skill Card"]
            Title["Title"]
        end
        
        subgraph Styles
            GlobalStyles["Global Styles"]
            Variables["Style Variables"]
        end
        
        StaticAssets[("Static Assets")]
    end

    %% Relationships
    ViteServer --> ReactApp
    ReactApp --> Router
    Router --> HomePage & AboutPage & ProjectsPage & ContactPage
    HomePage & AboutPage & ProjectsPage & ContactPage --> Navbar
    ProjectsPage --> ProjectCard
    HomePage --> SkillCard
    Pages --> Title
    GlobalStyles --> Components
    Variables --> GlobalStyles
    Components --> StaticAssets

    %% Styling
    classDef infrastructure fill:#a8dadc,stroke:#457b9d
    classDef router fill:#e9c46a,stroke:#264653
    classDef pages fill:#f4a261,stroke:#264653
    classDef components fill:#2a9d8f,stroke:#264653
    classDef styles fill:#e76f51,stroke:#264653
    classDef assets fill:#264653,stroke:#264653,color:#fff

    class ViteServer,ReactApp infrastructure
    class Router router
    class HomePage,AboutPage,ProjectsPage,ContactPage pages
    class Navbar,ProjectCard,SkillCard,Title components
    class GlobalStyles,Variables styles
    class StaticAssets assets

    %% Click Events
    click ViteServer "https://github.com/thiago186/portfoliov2/blob/main/vite.config.js"
    click ReactApp "https://github.com/thiago186/portfoliov2/blob/main/src/App.jsx"
    click HomePage "https://github.com/thiago186/portfoliov2/blob/main/src/pages/HomePage.jsx"
    click AboutPage "https://github.com/thiago186/portfoliov2/blob/main/src/pages/AboutMePage.jsx"
    click ProjectsPage "https://github.com/thiago186/portfoliov2/blob/main/src/pages/ProjectsPage.jsx"
    click ContactPage "https://github.com/thiago186/portfoliov2/blob/main/src/pages/ContactMePage.jsx"
    click Navbar "https://github.com/thiago186/portfoliov2/blob/main/src/components/Navbar/navbar.jsx"
    click ProjectCard "https://github.com/thiago186/portfoliov2/blob/main/src/components/ProjectCard/ProjectCard.jsx"
    click SkillCard "https://github.com/thiago186/portfoliov2/blob/main/src/components/SkillCard/SkillCard.jsx"
    click Title "https://github.com/thiago186/portfoliov2/blob/main/src/components/Title/Title.jsx"
    click GlobalStyles "https://github.com/thiago186/portfoliov2/blob/main/src/styles/global.css"
    click Variables "https://github.com/thiago186/portfoliov2/blob/main/src/styles/variables.css"
    click StaticAssets "https://github.com/thiago186/portfoliov2/tree/main/public/"
```
