# hrushimakode/portfolio architecture

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

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

## Overview

##### Project Type and Purpose
- This is a client-side portfolio website showcasing personal projects, skills, work experience, and contact information.
- The README clearly emphasizes that the tech stack is React for the frontend.
- Firebase is used for deployment (and possibly additional features like hosting).

##### File Structure
- Top-level Directories and Files:
- The “public” folder contains static assets like index.html, manifest, and robots.txt – this is the entry point for the React app.
- The “src” folder holds all the source code. It is organized into:
- Components: divided into logical subdirectories (Home, Header, Footer, Body sections for About, Contact, Projects, etc.). This shows adherence to component-based design.
- Data: holding JavaScript files that include portfolio projects, skills, social data, and work experience details.
- Configuration files: package.json for dependency management, firebase.json for Firebase deployment settings, and GitHub workflow files for CI/CD.
- This structure follows modern best practices for React apps, allowing modular development with reusable components.

##### Key Components and their Interactions
- Entry Point (public/index.html and src/index.js): Loads the React application. The root component (likely defined in src/App.js) orchestrates the rendering of the overall interface.
- React Components:
- Header (with mobile and web subcomponents) that manages navigation.
- Home, About, Projects, Skills, Work, and Contact sections that make up the “Body” of the portfolio.
- Footer and common components like separators and social contact panels.
- Assets and Data: Provide the media files and content that these components render.
- Deployment/Hosting: Firebase configuration indicates that the final build (created by the React build process) is deployed via Firebase Hosting. GitHub workflows automate the testing (linter.yml) and deployment processes.

##### Architectural Patterns/Design Principles
- Component-based architecture typical in React applications, which emphasizes separation of concerns by dividing UI into small, manageable pieces.
- Unidirectional data flow is implied from the design, where state and data are managed centrally (or in a lightweight manner) and passed as props into child components.
- Emphasis on modularity: Each visual/functional section (e.g., About, Work, Projects) is isolated within its own directory with dedicated style, logic, and asset files.
- CI/CD integration using GitHub workflows ensures a smooth development and deployment pipeline.

##### Final Components
- Clear labels for:
- Entry Point (index.html, index.js, App.js)
- UI Components: Header, Home, Body (About, Projects, Skills, Work, Contact), Footer, Common Components
- Data and Assets (from src/data and src/Assets)
- Build & Deployment Process (Firebase and GitHub Workflows)
- Component hierarchy (parent-child relationships)
- Deployment flow (local build → GitHub workflows → Firebase Hosting)
- UI components versus infrastructure/deployment artifacts

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Frontend/UI Layer"
        subgraph "Entry Point"
            IndexHTML("index.html (Entry Point)"):::ui
            IndexJS("index.js (Entry Point)"):::ui
            AppComponent("App.js (Root Component)"):::ui
        end
        IndexHTML --> AppComponent
        IndexJS --> AppComponent

        subgraph "UI Components"
            Header("Header"):::ui
            Home("Home"):::ui
            subgraph "Body"
                About("About"):::ui
                Projects("Projects"):::ui
                Skills("Skills"):::ui
                Work("Work"):::ui
                Contact("Contact"):::ui
            end
            Footer("Footer"):::ui
            subgraph "Common Components"
                Separator("Separator"):::ui
                SocialContact("Social Contact"):::ui
            end
        end
        AppComponent -->|"renders"| Header
        AppComponent -->|"renders"| Home
        AppComponent -->|"renders"| About
        AppComponent -->|"renders"| Projects
        AppComponent -->|"renders"| Skills
        AppComponent -->|"renders"| Work
        AppComponent -->|"renders"| Contact
        AppComponent -->|"renders"| Footer
        AppComponent -->|"uses"| Separator
        AppComponent -->|"uses"| SocialContact

        Header ---|"includes"| HeaderMobile("Header Mobile"):::ui
        Header ---|"includes"| HeaderWeb("Header Web"):::ui

        AppComponent ---|"loads"| Assets("Assets"):::ui
        AppComponent ---|"loads"| Data("Data"):::ui
    end

    subgraph "Deployment & Hosting"
        FirebaseHosting("Firebase Hosting/Deployment"):::deploy
        GitHubWorkflows("GitHub Workflows (CI/CD)"):::deploy
        FirebaseConfig("Firebase Config"):::deploy
        GitHubWorkflows -->|"deploys"| FirebaseHosting
        FirebaseConfig --> FirebaseHosting
        FirebaseHosting -->|"serves"| IndexHTML
    end

    click IndexHTML "https://github.com/hrushimakode/portfolio/blob/master/public/index.html"
    click IndexJS "https://github.com/hrushimakode/portfolio/blob/master/src/index.js"
    click AppComponent "https://github.com/hrushimakode/portfolio/blob/master/src/App.js"
    click Header "https://github.com/hrushimakode/portfolio/tree/master/src/components/Header"
    click HeaderMobile "https://github.com/hrushimakode/portfolio/tree/master/src/components/Header/mobile"
    click HeaderWeb "https://github.com/hrushimakode/portfolio/tree/master/src/components/Header/web"
    click Home "https://github.com/hrushimakode/portfolio/tree/master/src/components/Home"
    click About "https://github.com/hrushimakode/portfolio/tree/master/src/components/Body/About"
    click Projects "https://github.com/hrushimakode/portfolio/tree/master/src/components/Body/Projects"
    click Skills "https://github.com/hrushimakode/portfolio/tree/master/src/components/Body/Skills"
    click Work "https://github.com/hrushimakode/portfolio/tree/master/src/components/Body/Work"
    click Contact "https://github.com/hrushimakode/portfolio/tree/master/src/components/Body/Contact"
    click Separator "https://github.com/hrushimakode/portfolio/tree/master/src/components/common/Separator"
    click SocialContact "https://github.com/hrushimakode/portfolio/tree/master/src/components/common/SocialContact"
    click Footer "https://github.com/hrushimakode/portfolio/tree/master/src/components/Footer"
    click Assets "https://github.com/hrushimakode/portfolio/tree/master/src/Assets"
    click Data "https://github.com/hrushimakode/portfolio/tree/master/src/data"
    click FirebaseConfig "https://github.com/hrushimakode/portfolio/blob/master/firebase.json"
    click GitHubWorkflows "https://github.com/hrushimakode/portfolio/tree/master/.github/workflows"

    classDef ui fill:#e0f7fa,stroke:#006064,stroke-width:2px,rx:5,ry:5
    classDef deploy fill:#fff9c4,stroke:#f9a825,stroke-width:2px,rx:5,ry:5
```
