# joselriascos/web_portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/joselriascos/web_portfolio
- Repository: https://github.com/joselriascos/web_portfolio

## Overview

##### Project type and purpose
- This is a single‐page React web portfolio (“WEB PORTFOLIO”).
- Built with Vite, it serves as a front-end showcase (no dedicated backend/service code).

##### File structure
- Top-level:
– index.html, public/ (static assets + redirect rules), package.json, vite.config.js
- src/:
– main.jsx: entrypoint bootstrapping React into index.html
– App.jsx / App.css: root component and styling
– routes/router.jsx: defines client-side routes (Home, AboutMe, Contact, ProjectPage, 404)
– pages/: page containers rendered by the router
– Components/: reusable UI pieces (Header, Footer, WorkSection, Project, ContactInfo, LogoLoop, Particles, etc.)
– contexts/AppContext.jsx & hooks/useAppContext.js: global state via React Context
– data/projects.json: static project metadata
– hooks/: custom hooks (useTitle, useCarousel, useHeader, useDisableScroll)
– utils/: shared constants & helper functions

##### Key architectural insights from README
- A static SPA meant for deployment on a static host (Netlify, Vercel, S3).
- Uses client-side routing and component composition to render dynamic sections.

##### Elements
– Clear component labels: e.g., “Router”, “HomePage”, “ProjectList Component”
- From Browser → Static Host → index.html
- index.html → React Mount Point → App Component
- Router → Pages → Components → Data

##### Putting it all together
- Under Static Host, show index.html + bundle.js/css + public assets.
– Context Provider → Router Layer → Page Components → UI Components
- Custom hooks and their roles (e.g., useTitle sets document.title).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% User and Hosting
    Browser["User's Browser"]:::external
    subgraph "Build & Deploy" 
        ViteDev["Vite Dev Server / Build Pipeline"]:::build
        ViteDev -->|"builds"| Dist["/dist (bundle.js, CSS, assets)"]:::build
        Dist --> StaticHost
    end

    subgraph "Static Host / CDN"
        StaticHost["Static Host / CDN"]:::build
        StaticHost -->|serves index.html| Index["index.html"]:::build
        StaticHost -->|serves static assets| Public["public/"]:::build
    end

    Browser -->|requests| StaticHost

    %% React Application Runtime
    subgraph "React Application (bundle.js)" 
        AppMount["React Mount Point"]:::runtime
        Context["AppContextProvider"]:::runtime
        Router["Router Layer"]:::runtime
        subgraph "Pages" 
            Home["Home Page"]:::pages
            About["AboutMe Page"]:::pages
            Contact["Contact Page"]:::pages
            ProjectPage["Project Page"]:::pages
            NotFound["404 Page"]:::pages
        end
        subgraph "UI Components"
            Header["Header / Navigation"]:::components
            Footer["Footer"]:::components
            WorkSection["WorkSection"]:::components
            ProjectCard["Project Card"]:::components
            ContactInfo["ContactInfo"]:::components
            ContactLinks["ContactLinks"]:::components
            LogoLoop["LogoLoop"]:::components
            Particles["Particles"]:::components
            TitleComp["Title"]:::components
            ObservedAnim["ObservedAnimatedComponent"]:::components
            Icons["Icons helper"]:::components
        end
        subgraph "Custom Hooks"
            useTitle["useTitle"]:::hooks
            useCarousel["useCarousel"]:::hooks
            useHeader["useHeader"]:::hooks
            useDisableScroll["useDisableScroll"]:::hooks
        end
        AppMount --> Context
        Context --> Router
        Router --> Home
        Router --> About
        Router --> Contact
        Router --> ProjectPage
        Router --> NotFound
        Home --> Header
        Home --> WorkSection
        About --> Header
        About --> TitleComp
        Contact --> ContactInfo
        Contact --> ContactLinks
        ProjectPage --> ProjectCard
        ProjectPage --> LogoLoop
        AllPages["Pages"] -.-> ProjectsData
        AllComp["UI Components"] -.-> ProjectsData
        Context -.-> useTitle
        Header -.-> useHeader
        WorkSection -.-> useCarousel
        Context -.-> useDisableScroll
    end

    %% Data Layer
    subgraph "Data Layer"
        ProjectsData["projects.json"]:::data
        Images["public/Images/"]:::data
    end
    Home -->|imports| ProjectsData
    ProjectPage -->|imports| ProjectsData
    AllPages --> Images
    AllComp --> Images

    %% Click Events
    click Index "https://github.com/joselriascos/web_portfolio/blob/main/index.html"
    click Public "https://github.com/joselriascos/web_portfolio/tree/main/public/"
    click ViteDev "https://github.com/joselriascos/web_portfolio/blob/main/vite.config.js"
    click ViteDev "https://github.com/joselriascos/web_portfolio/blob/main/package.json"
    click Dist "https://github.com/joselriascos/web_portfolio/blob/main/vite.config.js"
    click AppMount "https://github.com/joselriascos/web_portfolio/blob/main/src/main.jsx"
    click AppMount "https://github.com/joselriascos/web_portfolio/blob/main/src/index.css"
    click Router "https://github.com/joselriascos/web_portfolio/blob/main/src/routes/router.jsx"
    click Context "https://github.com/joselriascos/web_portfolio/blob/main/src/contexts/AppContext.jsx"
    click Context "https://github.com/joselriascos/web_portfolio/blob/main/src/hooks/useAppContext.js"
    click Home "https://github.com/joselriascos/web_portfolio/blob/main/src/pages/Home.jsx"
    click About "https://github.com/joselriascos/web_portfolio/blob/main/src/pages/AboutMe/AboutMe.jsx"
    click About "https://github.com/joselriascos/web_portfolio/blob/main/src/pages/AboutMe/AboutMe.css"
    click Contact "https://github.com/joselriascos/web_portfolio/blob/main/src/pages/Contact/Contact.jsx"
    click Contact "https://github.com/joselriascos/web_portfolio/blob/main/src/pages/Contact/Contact.css"
    click ProjectPage "https://github.com/joselriascos/web_portfolio/blob/main/src/pages/Project/ProjectPage.jsx"
    click ProjectPage "https://github.com/joselriascos/web_portfolio/blob/main/src/pages/Project/ProjectPage.css"
    click NotFound "https://github.com/joselriascos/web_portfolio/blob/main/src/pages/404/404.jsx"
    click NotFound "https://github.com/joselriascos/web_portfolio/blob/main/src/pages/404/404.css"
    click Header "https://github.com/joselriascos/web_portfolio/blob/main/src/Components/Header/Header.jsx"
    click Header "https://github.com/joselriascos/web_portfolio/blob/main/src/Components/Header/Header.css"
    click Header "https://github.com/joselriascos/web_portfolio/blob/main/src/Components/Header/OpenCloseMenu.jsx"
    click Footer "https://github.com/joselriascos/web_portfolio/blob/main/src/Components/Footer/Footer.jsx"
    click Footer "https://github.com/joselriascos/web_portfolio/blob/main/src/Components/Footer/Footer.css"
    click WorkSection "https://github.com/joselriascos/web_portfolio/blob/main/src/Components/WorkSection/WorkSection.jsx"
    click WorkSection "https://github.com/joselriascos/web_portfolio/blob/main/src/Components/WorkSection/WorkSection.css"
    click ProjectCard "https://github.com/joselriascos/web_portfolio/blob/main/src/Components/Project/Project.jsx"
    click ProjectCard "https://github.com/joselriascos/web_portfolio/blob/main/src/Components/Project/Project.css"
    click ContactInfo "https://github.com/joselriascos/web_portfolio/blob/main/src/Components/ContactInfo/ContactInfo.jsx"
    click ContactInfo "https://github.com/joselriascos/web_portfolio/blob/main/src/Components/ContactInfo/ContactInfo.css"
    click ContactLinks "https://github.com/joselriascos/web_portfolio/blob/main/src/Components/ContactLinks/ContactLinks.jsx"
    click ContactLinks "https://github.com/joselriascos/web_portfolio/blob/main/src/Components/ContactLinks/ContactLinks.css"
    click ContactLinks "https://github.com/joselriascos/web_portfolio/blob/main/src/Components/ContactLinks/ContactLink.jsx"
    click LogoLoop "https://github.com/joselriascos/web_portfolio/blob/main/src/Components/LogoLoop/LogoLoop.jsx"
    click LogoLoop "https://github.com/joselriascos/web_portfolio/blob/main/src/Components/LogoLoop/LogoLoop.css"
    click Particles "https://github.com/joselriascos/web_portfolio/blob/main/src/Components/Particles/Particles.jsx"
    click Particles "https://github.com/joselriascos/web_portfolio/blob/main/src/Components/Particles/Particles.css"
    click TitleComp "https://github.com/joselriascos/web_portfolio/blob/main/src/Components/Title/Title.jsx"
    click TitleComp "https://github.com/joselriascos/web_portfolio/blob/main/src/Components/Title/Title.css"
    click ObservedAnim "https://github.com/joselriascos/web_portfolio/blob/main/src/Components/ObservedAnimatedComponent.jsx"
    click Icons "https://github.com/joselriascos/web_portfolio/blob/main/src/Components/Icons.jsx"
    click useTitle "https://github.com/joselriascos/web_portfolio/blob/main/src/hooks/useTitle.js"
    click useCarousel "https://github.com/joselriascos/web_portfolio/blob/main/src/hooks/useCarousel.js"
    click useHeader "https://github.com/joselriascos/web_portfolio/blob/main/src/hooks/useHeader.js"
    click useDisableScroll "https://github.com/joselriascos/web_portfolio/blob/main/src/hooks/useDisableScroll.js"
    click ProjectsData "https://github.com/joselriascos/web_portfolio/blob/main/src/data/projects.json"
    click Images "https://github.com/joselriascos/web_portfolio/tree/main/public/Images/"
    
    %% Styles
    classDef external fill:#f9f,stroke:#333,stroke-width:1px
    classDef build fill:#ddd,stroke:#999,stroke-width:1px
    classDef runtime fill:#bbf,stroke:#339,stroke-width:1px
    classDef pages fill:#fcf,stroke:#c36,stroke-width:1px
    classDef components fill:#ffe599,stroke:#c60,stroke-width:1px
    classDef hooks fill:#cfe2f3,stroke:#093,stroke-width:1px
    classDef data fill:#d5ead1,stroke:#228,stroke-width:1px
```
