# mr-vivekkumar/portfolio architecture

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

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

## Overview

##### Project Type and Purpose
- This is a React-based portfolio website where the developer customizes personal information (about, projects, blog, skills, etc.) using static data files and interactive, reusable UI components.
- The README emphasizes customization, sections (HOME, ABOUT, RESUME, BLOG, CONTACTS), and integration with hosting platforms (Netlify, Firebase, etc.), indicating a project focused solely on front-end rendering and presentation.

##### File Structure to Identify Main Architectural Components
- Top-level folders like /public and /src clearly delineate the static assets from the React app code.
- Within the /src folder you have:
- Assets (images, fonts, animations) that provide the visual resources.
- Components – further divided into container components (specific pages like landing, blog, projects, etc.) and core UI components (which look to be more granular units like Navbar, About, Skills, etc.).
- Pages – organized by route (Home, Blog, Project pages) that use the components to construct views.
- Data – multiple JS files that hold customizable content (personal info, education, experience, projects, and blog data). This effectively makes the data layer a static “content” provider.
- Contexts – for theme toggling and global state management.
- Hooks and Utils – small helper functions that assist components (for instance, animated scroll behavior, converting timestamps, or loading images for skills).
- Theme – contains styling and image resources that support theming across the application.
- There are also Docker-related files (Dockerfile, docker-compose, etc.) which indicate containerized deployment and possibly even local development environment configuration.

a. Main Components:
- Client (React Application)
- Entry Point: index.js that renders the App component.
- Routing/Pages: “pages” folder for Home, Blog, Projects, etc.
- UI Components: “components” folder housing container and core UI groups (such as Navbar, Landing, About, Education, Experience, Projects, etc.).
- Data Layer: “data” files acting as service layers which supply static content to components.
- Context Providers: “contexts” for global state (like ThemeContext) that wrap around the component tree.
- Assets: “assets” (fonts, SVGs, lottie animations) and “public” (index.html, manifest, etc.) – note that these are used for static content delivery.
- Helper Utilities: “hooks” and “utils” that abstract common functionality (e.g., loading animations, time converters).
- External Libraries and Frameworks:
- React Router is used for navigating among different pages.
- Animation libraries like react-lottie and react-reveal.
- Other dependencies like EmailJS for contacts form integration and react-slick for carousel displays.
- Deployment/Infrastructure:
- Docker files indicating containerized builds.
- Configuration for various hosting platforms (Netlify, Firebase, Heroku, GitHub Pages) mentioned in the README.

b. Relationships and Interactions:
- The React entry point (index.js) loads the App component, which sets up global routing.
- The App component wraps all routed pages with the Context Provider(s) (e.g., ThemeContext) ensuring that theming or other global state is shared.
- Pages load by assembling various Components (containers and core UI) that individually pull data from the static “data” files.
- Components use helper functions and hooks to manage behaviors like smooth scrolling and animations.
- Visual assets from the “assets” and “public” folders are loaded to enhance the overall UI.
- The deployment configuration (Docker, environment variables, etc.) ensures that the front-end code is built and served via different hosting platforms.

c. Highlighted Architectural Patterns and Technologies:
- Component-based architecture:
- Separation into container components (routing-level, layout) and core UI components for reusability and ease of customization.
- Data-driven UI:
- The use of data files in the “data” folder to decouple content from presentation.
- Context API:
- Global state management (e.g., theming) using React Context.
- Containerized Deployment:
- Docker configuration files indicate a containerized approach to deployment.
- Front-end Routing:
- React Router for managing single-page application routing.

##### Specific Elements
- From the Data layer to Components.
- From context providers to child components.
- From the entry point to pages and then to individual UI components.
- Optionally, indicate the deployment pipeline (from codebase to Docker container to hosting platform).
- External dependencies and libraries, listing them alongside the components where they play a role.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client Layer
    subgraph "Client Layer"
        A["Entry Point (Index.js)"]:::client
        B["App Component"]:::client
        C["Routing/Pages"]:::client
        D["Container & Core UI Components"]:::client
        E["Context Providers (Theme)"]:::client
        F["Helper Utilities (Hooks)"]:::client
        G["Helper Utilities (Utils)"]:::client
        H["Theming"]:::client
    end

    %% Data Layer
    subgraph "Data Layer"
        I["Static Content/Data Files"]:::data
    end

    %% Assets Layer
    subgraph "Assets Layer"
        J["Assets (src/assets)"]:::assets
        K["Static Assets (public)"]:::assets
    end

    %% Deployment & Infrastructure
    subgraph "Deployment & Infrastructure"
        L["Dockerfile"]:::deployment
        M["docker-compose.yml"]:::deployment
        N["docker-compose.debug.yml"]:::deployment
        O[".dockerignore"]:::deployment
    end

    %% External Libraries
    subgraph "External Libraries"
        P["React Router, Material-UI, React Icons, react-lottie, react-reveal, EmailJS, react-slick"]:::external
    end

    %% Relationships among Client components
    A -->|"loads"| B
    B -->|"configures"| E
    B -->|"setsUp"| C
    C -->|"renders"| D
    D -->|"fetchesData"| I
    D -->|"usesHook"| F
    D -->|"usesUtil"| G
    D -->|"appliesTheme"| H
    D -->|"displays"| J
    D -->|"displays"| K
    B -->|"integrates"| P

    %% Deployment Pipeline Relationships
    A -.->|"containerizedBy"| L
    L -.->|"orchestratedVia"| M
    M -.->|"debugConfig"| N
    N -.->|"excludesFiles"| O

    %% Click Events
    click A "https://github.com/mr-vivekkumar/portfolio/blob/main/src/index.js"
    click C "https://github.com/mr-vivekkumar/portfolio/tree/main/src/pages"
    click D "https://github.com/mr-vivekkumar/portfolio/tree/main/src/components"
    click I "https://github.com/mr-vivekkumar/portfolio/tree/main/src/data"
    click E "https://github.com/mr-vivekkumar/portfolio/blob/main/src/contexts/theme-context.js"
    click J "https://github.com/mr-vivekkumar/portfolio/tree/main/src/assets"
    click K "https://github.com/mr-vivekkumar/portfolio/tree/main/public"
    click F "https://github.com/mr-vivekkumar/portfolio/tree/main/src/hooks"
    click G "https://github.com/mr-vivekkumar/portfolio/tree/main/src/utils"
    click H "https://github.com/mr-vivekkumar/portfolio/tree/main/src/theme"
    click L "https://github.com/mr-vivekkumar/portfolio/tree/main/Dockerfile"
    click M "https://github.com/mr-vivekkumar/portfolio/blob/main/docker-compose.yml"
    click N "https://github.com/mr-vivekkumar/portfolio/blob/main/docker-compose.debug.yml"
    click O "https://github.com/mr-vivekkumar/portfolio/blob/main/.dockerignore"

    %% Styles
    classDef client fill:#cce5ff,stroke:#004085,stroke-width:2px;
    classDef data fill:#d4edda,stroke:#155724,stroke-width:2px;
    classDef assets fill:#fff3cd,stroke:#856404,stroke-width:2px;
    classDef deployment fill:#f8d7da,stroke:#721c24,stroke-width:2px;
    classDef external fill:#d1ecf1,stroke:#0c5460,stroke-width:2px;

    class A,B,C,D,E,F,G,H client;
    class I data;
    class J,K assets;
    class L,M,N,O deployment;
    class P external;
```
