# aarishirfan/portfolio architecture

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

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

## Overview

##### Project type and purpose
- This is a personal portfolio website built as a React single-page application (SPA) that uses HTML, CSS, and Bootstrap for layout and styling.
- The README also indicates a Node.js + Express.js backend layer to serve the static files and handle any API requests (e.g., contact form submissions).

##### File structure
- Top-level files:
- package.json / package-lock.json (project dependencies, scripts)
- README.md / .gitignore
- public/
- Static assets (index.html, manifest.json, robots.txt, and your PDF resume)
- src/
- src/index.js (application entry point)
- src/App.js / App.css (root React component)
- src/components/… (modular React components organized by feature: Navbar, Home, About, Projects, Footer, etc.)
- src/Assets/Projects (images or data for projects)
- test harness: App.test.js, setupTests.js, reportWebVitals.js
- No explicit “server/” directory is present, so the Express layer may live in a separate repo or be a simple static‐serving server embedded in package.json scripts.

##### README for additional insights
- Tech stack: ReactJS, HTML, CSS, Bootstrap on the frontend; Node.js + Express.js on the backend.
- Multi-page layout—implemented either via React Router or separate HTML files, but the file tree suggests a SPA with dynamic sections.

a. Main components
- Developer workstation (code editor, Git)
- Version Control (GitHub)
- CI/CD pipeline (optional—e.g., GitHub Actions, Netlify CI)
- Build toolchain (npm scripts, Webpack/Babel under the hood)
- Frontend SPA (ReactJS + Bootstrap)
- Backend server (Node.js + Express.js)
- Static file hosting / CDN (e.g., Netlify, Vercel, or your own host)
- External services (optional—email service for contact form, analytics, GitHub API)
b. Relationships & data flow
1. Developer → Git push → GitHub
2. CI/CD → triggers build → runs npm build → generates optimized static bundle
3. Build artifacts → deploy → Static host / CDN
4. User browser requests index.html → served by host/CDN → loads React bundle
5. React app renders Home, About, Projects, etc.
6. On contact or dynamic requests → React → HTTP call → Express API endpoint → processes / forwards to email service or database → response back to React
c. Architectural patterns & design principles
- Component-based UI (React), single-page application
- Separation of concerns: UI vs. API layer
- Static build pipeline for optimized delivery
- Optional microservices or serverless functions for light back-end tasks
d. Key technologies & frameworks
- ReactJS (frontend framework)
- Bootstrap (UI layout)
- Node.js + Express.js (server)
- npm / Webpack / Babel (build toolchain)
- Git / GitHub (version control)
- Optional: Netlify/Vercel (hosting), SendGrid/Mailgun (email), Google Analytics

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Developer and Version Control
    Developer["Developer Workstation"]:::dev
    GitHub["GitHub (Version Control)"]:::external

    Developer -->|"git push"| GitHub

    %% CI/CD Pipeline
    GitHub -->|"trigger build"| CICD["CI/CD Pipeline"]:::pipeline
    CICD -->|"npm build"| BuildTool["Build Toolchain"]:::pipeline
    BuildTool -->|"artifact"| BuildArtifact["Build Artifacts"]:::pipeline

    %% Deployment
    BuildArtifact -->|"deploy"| CDN["Static Host / CDN"]:::external

    %% User Interaction
    User["User Browser"]:::external
    User -->|"GET /index.html"| CDN
    CDN -->|"serves static files"| ReactApp["React SPA"]:::frontend

    %% Frontend SPA
    subgraph "Frontend SPA" 
        direction TB
        Entry["Entry Point\nsrc/index.js"]:::frontend
        Root["Root Component\nsrc/App.js"]:::frontend
        Styles["Global Styles\nApp.css, index.css, style.css"]:::frontend
        ComponentsDir["React Components\nsrc/components/"]:::frontend

        Entry --> Root
        Root --> Styles
        Root --> ComponentsDir

        %% Components
        subgraph "Components"
            direction TB
            Navbar["Navbar\nNavbar.js"]:::frontend
            HomeGroup["Home Section"]:::frontend
            AboutGroup["About Section"]:::frontend
            ProjectsGroup["Projects Section"]:::frontend
            Footer["Footer\nFooter.js"]:::frontend
            ScrollTop["ScrollToTop\nScrollToTop.js"]:::frontend
            Pre["Preformatted Text\nPre.js"]:::frontend
            Assets["Project Assets\nsrc/Assets/Projects/"]:::frontend

            ComponentsDir --> Navbar
            ComponentsDir --> HomeGroup
            ComponentsDir --> AboutGroup
            ComponentsDir --> ProjectsGroup
            ComponentsDir --> Footer
            ComponentsDir --> ScrollTop
            ComponentsDir --> Pre
            ComponentsDir --> Assets

            subgraph "Home Section"
                HomeComp["Home\nHome.js"]:::frontend
                TypeComp["Type\nType.js"]:::frontend
                HomeGroup --> HomeComp
                HomeGroup --> TypeComp
            end

            subgraph "About Section"
                AboutComp["About\nAbout.js"]:::frontend
                AboutCard["AboutCard\nAboutCard.js"]:::frontend
                GitHubComp["Github\nGithub.js"]:::frontend
                TechStack["Techstack\nTechstack.js"]:::frontend
                ToolStack["Toolstack\nToolstack.js"]:::frontend
                AboutGroup --> AboutComp
                AboutGroup --> AboutCard
                AboutGroup --> GitHubComp
                AboutGroup --> TechStack
                AboutGroup --> ToolStack
            end

            subgraph "Projects Section"
                ProjectsComp["Projects\nProjects.js"]:::frontend
                ProjectCards["ProjectCards\nProjectCards.js"]:::frontend
                ProjectsGroup --> ProjectsComp
                ProjectsGroup --> ProjectCards
            end
        end
    end

    ReactApp -->|"HTTP POST /api/contact"| Express["Express Server\nNode.js + Express"]:::backend
    Express -->|"sends email via SMTP"| EmailService["Email Service"]:::external
    ReactApp -->|"analytics"| Analytics["Google Analytics"]:::external

    %% Build Toolchain details
    subgraph "Build Toolchain Details"
        direction TB
        PackageJSON["package.json\npackage-lock.json"]:::pipeline
        Tests["Test Harness\nApp.test.js, setupTests.js, reportWebVitals.js"]:::pipeline
        Public["Public Directory\npublic/"]:::pipeline

        BuildTool --> PackageJSON
        BuildTool --> Tests
        Public --> CDN
    end

    %% Click Events
    click Entry "https://github.com/aarishirfan/portfolio/blob/main/src/index.js"
    click Root "https://github.com/aarishirfan/portfolio/blob/main/src/App.js"
    click Styles "https://github.com/aarishirfan/portfolio/blob/main/src/App.css"
    click ComponentsDir "https://github.com/aarishirfan/portfolio/tree/main/src/components/"
    click Navbar "https://github.com/aarishirfan/portfolio/blob/main/src/components/Navbar.js"
    click HomeComp "https://github.com/aarishirfan/portfolio/blob/main/src/components/Home/Home.js"
    click TypeComp "https://github.com/aarishirfan/portfolio/blob/main/src/components/Home/Type.js"
    click AboutComp "https://github.com/aarishirfan/portfolio/blob/main/src/components/About/About.js"
    click AboutCard "https://github.com/aarishirfan/portfolio/blob/main/src/components/About/AboutCard.js"
    click GitHubComp "https://github.com/aarishirfan/portfolio/blob/main/src/components/About/Github.js"
    click TechStack "https://github.com/aarishirfan/portfolio/blob/main/src/components/About/Techstack.js"
    click ToolStack "https://github.com/aarishirfan/portfolio/blob/main/src/components/About/Toolstack.js"
    click ProjectsComp "https://github.com/aarishirfan/portfolio/blob/main/src/components/Projects/Projects.js"
    click ProjectCards "https://github.com/aarishirfan/portfolio/blob/main/src/components/Projects/ProjectCards.js"
    click Footer "https://github.com/aarishirfan/portfolio/blob/main/src/components/Footer.js"
    click ScrollTop "https://github.com/aarishirfan/portfolio/blob/main/src/components/ScrollToTop.js"
    click Pre "https://github.com/aarishirfan/portfolio/blob/main/src/components/Pre.js"
    click Assets "https://github.com/aarishirfan/portfolio/tree/main/src/Assets/Projects/"
    click Public "https://github.com/aarishirfan/portfolio/tree/main/public/"
    click PackageJSON "https://github.com/aarishirfan/portfolio/blob/main/package.json"
    click Tests "https://github.com/aarishirfan/portfolio/blob/main/src/App.test.js"

    %% Styles
    classDef dev fill:#ffcccc,stroke:#333,stroke-width:1px;
    classDef pipeline fill:#ccffcc,stroke:#333,stroke-width:1px;
    classDef frontend fill:#cce5ff,stroke:#333,stroke-width:1px;
    classDef backend fill:#ffe6cc,stroke:#333,stroke-width:1px;
    classDef external fill:#e6e6e6,stroke:#333,stroke-width:1px;
```
