# chivicks-hazard/personal-portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/chivicks-hazard/personal-portfolio
- Repository: https://github.com/chivicks-hazard/personal-portfolio

## Overview

##### Main Components
- Browser/Client: The end user’s environment which loads index.html.
- Entry Point & Bootstrapping: index.html loads src/main.jsx which bootstraps the React application.
- App Container: src/App.jsx acts as the root component, orchestrating page-wide behaviors.
- Page Routing & Layout: src/pages (e.g., Mainpage.jsx, PortfolioPage.jsx) represent distinct pages. These are wrapped inside layout components such as src/layouts/MainLayout.jsx.
- UI Components: src/components contains several re-usable components (such as intro, about, carousel, education, projects, skills, footer, socials, and testimonial) that compose the actual portfolio content.
- Assets & Styling: The directories src/assets, src/css, src/scss, and public/images hold images, CSS, and SCSS files. Additionally, configuration files like tailwind.config.js, postcss.config.js, and vite.config.js indicate build and style processing requirements.
- Configuration and Build Tools: Files like vite.config.js, package.json, .eslintrc.cjs, and .prettierrc show the tooling (linting, formatting, and bundling) that supports the project.

##### Out the Relationships and Interactions
- The Browser loads index.html, which provides the container for the React app.
- main.jsx (the application entry) initializes the App component.
- App.jsx orchestrates the routing between pages (e.g., Mainpage, PortfolioPage) and applies a common layout (MainLayout.jsx).
- The Layout component integrates various UI components from the components folder (e.g., introduction, about, education, projects, etc.) to render complete sections of the portfolio.
- Assets and style files are imported into components to provide styling through CSS/Sass/Tailwind.

##### Architectural Patterns & Design Principles
- Component-Based Architecture: The React components follow a modular setup allowing reusability.
- Separation of Concerns: There’s a clear partition between layout, routing (pages), and individual UI building blocks (components).
- Build & Tooling Integration: Vite handles bundling and hot-module replacement. Supporting config files (tailwind.config.js, postcss.config.js) suggest a decoupled approach to styling and asset optimization.

##### Relevant Technologies & Frameworks
- React: For building the user interface and handling component logic.
- Vite: As the development server and bundler to speed up build processes.
- Tailwind CSS and Sass: For styling the application.
- Bootstrap (as indicated by the README): Likely used for additional UI components or grid systems.
- ESLint/Prettier: To enforce code quality and style consistency.

## Diagram (Mermaid)

```mermaid
flowchart TD
    Browser["Browser/Client"]:::frontend
    HTML["index.html"]:::frontend
    MainJS["src/main.jsx"]:::frontend
    App["src/App.jsx"]:::frontend

    subgraph "Page Routing & Layout"
        MainLayout["src/layouts/MainLayout.jsx"]:::frontend
        subgraph "Pages"
            MainPage["src/pages/Mainpage.jsx"]:::frontend
            PortfolioPage["src/pages/PortfolioPage.jsx"]:::frontend
        end
    end

    subgraph "UI Components"
        Intro["src/components/intro.jsx"]:::components
        About["src/components/about.jsx"]:::components
        Carousel["src/components/carousel.jsx"]:::components
        Education["src/components/education.jsx"]:::components
        Projects["src/components/projects.jsx"]:::components
        Skills["src/components/skills.jsx"]:::components
        Footer["src/components/footer.jsx"]:::components
        Socials["src/components/socials.jsx"]:::components
        Testimonial["src/components/testominial.jsx"]:::components
        Icon["src/components/icon.jsx"]:::components
    end

    subgraph "Assets & Styling"
        Assets["src/assets"]:::assets
        AssetsImages["src/assets/images"]:::assets
        PublicImages["public/images"]:::assets
        CSS["src/css/index.css"]:::assets
        SCSSMods["src/scss/_mods.scss"]:::assets
        SCSSIndex["src/scss/index.scss"]:::assets
    end

    subgraph "Config & Build Tools"
        ViteConfig["vite.config.js"]:::config
        TailwindConfig["tailwind.config.js"]:::config
        PostCSSConfig["postcss.config.js"]:::config
        ESLintConfig[".eslintrc.cjs"]:::config
        PrettierConfig[".prettierrc"]:::config
        PackageJSON["package.json"]:::config
    end

    %% Primary Flow
    Browser -->|"loads"| HTML
    HTML -->|"bootstraps"| MainJS
    MainJS -->|"initializes"| App
    App -->|"renders layout"| MainLayout
    App -->|"routes to"| MainPage
    App -->|"routes to"| PortfolioPage

    %% Layout to UI Components
    MainLayout -->|"composes"| Intro
    MainLayout -->|"composes"| About
    MainLayout -->|"composes"| Carousel
    MainLayout -->|"composes"| Education
    MainLayout -->|"composes"| Projects
    MainLayout -->|"composes"| Skills
    MainLayout -->|"composes"| Footer
    MainLayout -->|"composes"| Socials
    MainLayout -->|"composes"| Testimonial
    MainLayout -->|"composes"| Icon

    %% UI Components using Assets & Styling
    Intro ---|"imports"| CSS
    About ---|"imports"| CSS
    Carousel ---|"imports"| CSS
    Education ---|"imports"| CSS
    Projects ---|"imports"| CSS
    Skills ---|"imports"| CSS
    Footer ---|"imports"| CSS
    Socials ---|"imports"| CSS
    Testimonial ---|"imports"| CSS
    Icon ---|"imports"| CSS
    CSS ---|"uses"| TailwindConfig
    CSS ---|"uses"| PostCSSConfig

    %% Build and Configuration Integration
    PackageJSON -->|"defines"| ViteConfig
    ViteConfig -->|"builds"| MainJS
    ESLintConfig -->|"checks"| App
    PrettierConfig -->|"formats"| App

    %% Assets connections
    Assets ---|"contains"| AssetsImages
    Assets ---|"supplies"| PublicImages

    %% Styles
    classDef frontend fill:#bbdefb,stroke:#0d47a1,stroke-width:2px;
    classDef components fill:#c8e6c9,stroke:#1b5e20,stroke-width:2px;
    classDef assets fill:#ffe0b2,stroke:#ef6c00,stroke-width:2px;
    classDef config fill:#f8bbd0,stroke:#880e4f,stroke-width:2px;

click HTML "https://github.com/chivicks-hazard/personal-portfolio/blob/master/index.html"
click MainJS "https://github.com/chivicks-hazard/personal-portfolio/blob/master/src/main.jsx"
click App "https://github.com/chivicks-hazard/personal-portfolio/blob/master/src/App.jsx"
click MainLayout "https://github.com/chivicks-hazard/personal-portfolio/blob/master/src/layouts/MainLayout.jsx"
click MainPage "https://github.com/chivicks-hazard/personal-portfolio/blob/master/src/pages/Mainpage.jsx"
click PortfolioPage "https://github.com/chivicks-hazard/personal-portfolio/blob/master/src/pages/PortfolioPage.jsx"
click Intro "https://github.com/chivicks-hazard/personal-portfolio/blob/master/src/components/intro.jsx"
click About "https://github.com/chivicks-hazard/personal-portfolio/blob/master/src/components/about.jsx"
click Carousel "https://github.com/chivicks-hazard/personal-portfolio/blob/master/src/components/carousel.jsx"
click Education "https://github.com/chivicks-hazard/personal-portfolio/blob/master/src/components/education.jsx"
click Projects "https://github.com/chivicks-hazard/personal-portfolio/blob/master/src/components/projects.jsx"
click Skills "https://github.com/chivicks-hazard/personal-portfolio/blob/master/src/components/skills.jsx"
click Footer "https://github.com/chivicks-hazard/personal-portfolio/blob/master/src/components/footer.jsx"
click Socials "https://github.com/chivicks-hazard/personal-portfolio/blob/master/src/components/socials.jsx"
click Testimonial "https://github.com/chivicks-hazard/personal-portfolio/blob/master/src/components/testominial.jsx"
click Icon "https://github.com/chivicks-hazard/personal-portfolio/blob/master/src/components/icon.jsx"
click Assets "https://github.com/chivicks-hazard/personal-portfolio/tree/master/src/assets"
click AssetsImages "https://github.com/chivicks-hazard/personal-portfolio/tree/master/src/assets/images"
click PublicImages "https://github.com/chivicks-hazard/personal-portfolio/tree/master/public/images"
click CSS "https://github.com/chivicks-hazard/personal-portfolio/blob/master/src/css/index.css"
click SCSSMods "https://github.com/chivicks-hazard/personal-portfolio/blob/master/src/scss/_mods.scss"
click SCSSIndex "https://github.com/chivicks-hazard/personal-portfolio/blob/master/src/scss/index.scss"
click ViteConfig "https://github.com/chivicks-hazard/personal-portfolio/blob/master/vite.config.js"
click TailwindConfig "https://github.com/chivicks-hazard/personal-portfolio/blob/master/tailwind.config.js"
click PostCSSConfig "https://github.com/chivicks-hazard/personal-portfolio/blob/master/postcss.config.js"
click ESLintConfig "https://github.com/chivicks-hazard/personal-portfolio/blob/master/.eslintrc.cjs"
click PrettierConfig "https://github.com/chivicks-hazard/personal-portfolio/blob/master/.prettierrc"
click PackageJSON "https://github.com/chivicks-hazard/personal-portfolio/blob/master/package.json"
```
