# anasrasheed03/portfolio-using-react architecture

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

- Interactive diagram: https://gitdiagram.com/anasrasheed03/portfolio-using-react
- Repository: https://github.com/anasrasheed03/portfolio-using-react

## Overview

##### Project type and purpose
- This is a single-page, front-end developer portfolio website built with React.
- It uses static JSON under `public/profile` to drive content (about, education, projects, etc.), CSS modules for styling, and context for theming.

##### File structure
- Top-level:
- Configuration files: `.env`, `.eslintrc.js`, `package.json`
- `public/`: static assets (HTML shell, manifest, robots.txt, images, and JSON content)
- `src/`: React source code (components, contexts, constants, CSS, theming)
- Under `src/`:
- `App.jsx` / `MainApp.jsx`: entrypoints
- `AppContext.js`: global state (theme toggler)
- `components/`: UI components structured by page (Home, About, Education, Experience, Projects, Skills, Social)
- `components/projects` and `components/projectsDetails`: project cards and detailed views
- `constants/endpoints.js`: paths to JSON profile endpoints
- `theme/`: global styles & theme definitions
- `css/`: page-specific styling
- No backend or database—data is fetched client-side from static JSON.

##### (empty) README for additional insights
- While the README is blank, the file tree makes it clear this is a static React app using local JSON to populate content.

##### Detail
- App Shell (App.jsx)
- Context Layer (AppContext)
- Pages (Home, About, Projects…)
- ProjectDetails subcomponent
- Call out the theming module under `theme/` and the constants module for endpoints.
- Static asset directories under the “Data Store” layer.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Deployment Layer
    subgraph "Hosting / CDN" 
        direction TB
        CDN["Static Web Server / CDN"]:::hosting
        indexHTML["index.html"]:::hosting
        CDN -->|serves| indexHTML
    end

    %% Client Layer
    subgraph "Client (Browser)" 
        direction TB
        Browser["User's Browser"]:::client
        Browser -->|requests index.html| CDN
        Browser -->|loads JS/CSS| CDN
        Browser -->|"boots React App"| ReactApp
    end

    %% React Application
    subgraph "React Single-Page Application" 
        direction TB
        AppShell["App Shell"]:::client
        MainApp["MainApp.jsx"]:::client
        AppShell --> MainApp

        subgraph "Context Layer"
            direction TB
            AppContext["AppContext.js"]:::client
            ThemeToggler["ThemeToggler.jsx"]:::client
        end

        subgraph "Routing & Endpoints"
            direction TB
            Endpoints["endpoints.js"]:::client
            RoutesConfig["routes.json"]:::client
        end

        subgraph "Pages"
            direction TB
            Home["Home.jsx"]:::client
            About["About.jsx"]:::client
            Education["Education.jsx"]:::client
            Experience["Experience.jsx"]:::client
            Projects["Projects.jsx"]:::client
            Skills["Skills.jsx"]:::client
            Social["Social.jsx"]:::client
        end

        subgraph "Project Components"
            direction TB
            ProjectCard["ProjectCard.jsx"]:::client
            ProjectDetails["ProjectDetails.jsx"]:::client
        end

        subgraph "Navigation & Layout"
            direction TB
            NavBar["NavBar.jsx"]:::client
            Header["Header.jsx"]:::client
            ModalWrapper["ModalWrapper.jsx"]:::client
        end

        subgraph "Styling & Theming"
            direction TB
            GlobalCSS["index.css / App.css"]:::client
            PageCSS["education.css / experience.css"]:::client
            Themes["GlobalStyles.js / themes.js"]:::client
        end

        AppShell --> AppContext
        AppShell --> Endpoints
        AppShell --> Home
        AppShell --> NavBar

        AppContext --> ThemeToggler
        Endpoints --> RoutesConfig

        Projects --> ProjectCard
        Projects --> ProjectDetails

        AppShell --> Styling
    end

    %% Data Stores
    subgraph "Static Assets & Data Stores"
        direction TB
        JSONStore["JSON Content Store"]:::data
        Images["Image Assets"]:::data
        Manifest["manifest.json / robots.txt"]:::data
    end

    ReactApp -->|fetches JSON| JSONStore
    ReactApp -->|loads images| Images

    %% Connections from Browser to React App
    Browser --> ReactApp

    %% Click Events
    click MainApp "https://github.com/anasrasheed03/portfolio-using-react/blob/master/src/MainApp.jsx"
    click AppShell "https://github.com/anasrasheed03/portfolio-using-react/blob/master/src/App.jsx"
    click AppContext "https://github.com/anasrasheed03/portfolio-using-react/blob/master/src/AppContext.js"
    click ThemeToggler "https://github.com/anasrasheed03/portfolio-using-react/blob/master/src/components/ThemeToggler.jsx"
    click Endpoints "https://github.com/anasrasheed03/portfolio-using-react/blob/master/src/constants/endpoints.js"
    click RoutesConfig "https://github.com/anasrasheed03/portfolio-using-react/blob/master/public/profile/routes.json"
    click Home "https://github.com/anasrasheed03/portfolio-using-react/blob/master/src/components/Home.jsx"
    click About "https://github.com/anasrasheed03/portfolio-using-react/blob/master/src/components/About.jsx"
    click Education "https://github.com/anasrasheed03/portfolio-using-react/blob/master/src/components/Education.jsx"
    click Experience "https://github.com/anasrasheed03/portfolio-using-react/blob/master/src/components/Experience.jsx"
    click Projects "https://github.com/anasrasheed03/portfolio-using-react/blob/master/src/components/Projects.jsx"
    click Skills "https://github.com/anasrasheed03/portfolio-using-react/blob/master/src/components/Skills.jsx"
    click Social "https://github.com/anasrasheed03/portfolio-using-react/blob/master/src/components/Social.jsx"
    click ProjectCard "https://github.com/anasrasheed03/portfolio-using-react/blob/master/src/components/projects/ProjectCard.jsx"
    click ProjectDetails "https://github.com/anasrasheed03/portfolio-using-react/blob/master/src/components/projectsDetails/ProjectDetails.jsx"
    click NavBar "https://github.com/anasrasheed03/portfolio-using-react/blob/master/src/components/NavBar.jsx"
    click Header "https://github.com/anasrasheed03/portfolio-using-react/blob/master/src/components/Header.jsx"
    click ModalWrapper "https://github.com/anasrasheed03/portfolio-using-react/blob/master/src/components/ModalWrapper/ModalWrapper.jsx"
    click JSONStore "https://github.com/anasrasheed03/portfolio-using-react/blob/master/public/profile/about.json"
    click JSONStore "https://github.com/anasrasheed03/portfolio-using-react/blob/master/public/profile/education.json"
    click JSONStore "https://github.com/anasrasheed03/portfolio-using-react/blob/master/public/profile/experiences.json"
    click JSONStore "https://github.com/anasrasheed03/portfolio-using-react/blob/master/public/profile/home.json"
    click JSONStore "https://github.com/anasrasheed03/portfolio-using-react/blob/master/public/profile/navbar.json"
    click JSONStore "https://github.com/anasrasheed03/portfolio-using-react/blob/master/public/profile/projects.json"
    click JSONStore "https://github.com/anasrasheed03/portfolio-using-react/blob/master/public/profile/skills.json"
    click JSONStore "https://github.com/anasrasheed03/portfolio-using-react/blob/master/public/profile/social.json"

    %% Styles
    classDef hosting fill:#cce5ff,stroke:#333,stroke-width:1px
    classDef client fill:#d4edda,stroke:#333,stroke-width:1px
    classDef data fill:#fff3cd,stroke:#333,stroke-width:1px
```
