# rohangoyal37/portfolio_website architecture

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

- Interactive diagram: https://gitdiagram.com/rohangoyal37/portfolio_website
- Repository: https://github.com/rohangoyal37/portfolio_website

## Overview

##### Project Type and Purpose
- This is a **frontend-only SPA** (built with Create-React-App) showcasing a personal portfolio: Home, About, Skills, Experience, Education, Projects, and Contact sections.
- It’s deployed as a static site but integrates with third-party services for email and maps.

##### File Structure
- Top-level files: `package.json`, `babel.config.js`, `tailwind.config.js` → build and styling configuration.
- `public/`: static assets (HTML template, PDF resumes, certificates, manifest).
- `src/`: React app source—entry point (`index.js`), global CSS, and component tree (`App.js` → `<Section/>` → `/components/...`).
- JSON data under `src/components/*/*.json` for Certifications, Projects, Skills.

##### Key Architectural Insights from README
- **Tech stack**: React, Tailwind CSS, Framer Motion, React-Spring, Recharts, EmailJS, Google Maps API, Vercel hosting.
- **Features**: Non-scroll navigation, glassmorphism, animations, theme switcher, responsive design.

##### Main Components & Relationships
a. User Client (Browser)
- Loads `index.html` + JS/CSS bundle from Vercel CDN
- Renders React SPA
b. React Application
- Component hierarchy:
– `<App>`
· `<Navbar>` (anchors for each section)
· `<ParticleBackground>` (animation + ThemeContext)
· `<Section>` (one‐per‐page view)
· Section modules: Home, About, Skills (with Recharts), Experience, Education, Projects, Contact (with EmailJS & Google Maps), Footer
- Static JSON data imported at build time for Projects, Skills, Certifications
- CSS/Tailwind modules for styling; CSS files per component
c. Build Pipeline & Hosting
- GitHub repo (push triggers Vercel)
- Vercel build: `npm install` → Babel/Webpack compile + Tailwind processing → `npm run build` → produce static `build/`
- Vercel CDN serves assets worldwide
d. External Services
- EmailJS REST API for sending contact form emails
- Google Maps JavaScript API for interactive map in Contact section

##### Architectural Patterns & Design Principles
- **Component-based SPA**: clear separation of UI concerns into reusable components
- **Data-driven views**: JSON files drive Certifications, Projects, Skills
- **Static hosting + client integration**: no custom backend—third-party APIs only
- **Theming & State**: React Context (ThemeContext) for light/dark mode

##### Essential Elements
- Clear component boundaries (e.g., root `<App>` vs. child sections)
- Build & deploy flow (GitHub → Vercel CI → CDN)
- External integrations with EmailJS and Google Maps
- Data sources: local JSON vs. third-party APIs

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% User and Delivery
    User["User Browser"]:::frontend
    CDN["Vercel CDN"]:::build

    User -->|"HTTPS GET index.html, JS, CSS"| CDN
    CDN -->|“Serves Bundles”| ReactApp

    %% Build & Deploy
    subgraph "Build & Deploy"
        GitHub["GitHub Repo"]:::build
        VercelCI["Vercel CI"]:::build
        BuildPipeline["Vercel Build Pipeline\n(Node.js, Babel, Webpack, Tailwind)"]:::build
        BuildPipeline -->|“npm run build”| CDN
        GitHub -->|"Push & Trigger"| VercelCI
        VercelCI -->|“Run Build”| BuildPipeline
    end

    %% Configuration Files
    subgraph "Build & Styling Configuration"
        Babel["babel.config.js"]:::build
        TailwindConfig["tailwind.config.js"]:::build
        PackageJSON["package.json"]:::build
    end
    Babel --- BuildPipeline
    TailwindConfig --- BuildPipeline
    PackageJSON --- BuildPipeline

    %% Public Assets
    subgraph "Static Hosting Assets (public)"
        HTML["public/index.html"]:::build
        Manifest["public/manifest.json"]:::build
        Robots["public/robots.txt"]:::build
        PDFs["public/Rohan_Goyal.pdf\npublic/Rohan_Goyal2.pdf"]:::build
        Certificates["public/certificates/"]:::build
    end
    HTML --- CDN
    Manifest --- CDN
    Robots --- CDN
    PDFs --- CDN
    Certificates --- CDN

    %% React Application
    subgraph "React Application (SPA)" 
        ReactApp["React SPA"]:::frontend
        ReactApp --> App
        ReactApp --> Loading
        ReactApp --> Navbar
        ReactApp --> ParticleBG
        ReactApp --> SectionWrapper
        ReactApp --> Sections
        ReactApp --> Footer
    end

    %% Core Components
    App["App (Root Component)"]:::frontend
    click App "https://github.com/rohangoyal37/portfolio_website/blob/main/src/App.js"

    Loading["Loading Animation"]:::frontend
    click Loading "https://github.com/rohangoyal37/portfolio_website/blob/main/src/LoadingAnimation.js"

    %% Navbar and Theme
    Navbar["Navbar"]:::frontend
    click Navbar "https://github.com/rohangoyal37/portfolio_website/blob/main/src/components/Navbar/Navbar.js"
    
    ParticleBG["ParticleBackground & ThemeContext"]:::frontend
    click ParticleBG "https://github.com/rohangoyal37/portfolio_website/blob/main/src/components/ParticleBackground/ParticlesBackground.js"
    
    SectionWrapper["Section Wrapper"]:::frontend
    click SectionWrapper "https://github.com/rohangoyal37/portfolio_website/blob/main/src/Section.js"

    %% Sections Group
    subgraph "Sections"
        HomeSec["Home Section"]:::frontend
        AboutSec["About Section"]:::frontend
        SkillsSec["Skills Section"]:::frontend
        ExperienceSec["Experience Section"]:::frontend
        EducationSec["Education Section"]:::frontend
        ProjectsSec["Projects Section"]:::frontend
        CertificationsSec["Certifications Section"]:::frontend
        ResumeSec["Resume Section"]:::frontend
        ContactSec["Contact Section"]:::frontend
    end

    %% Click Events for Sections
    click HomeSec "https://github.com/rohangoyal37/portfolio_website/blob/main/src/components/Home/Home.js"
    click AboutSec "https://github.com/rohangoyal37/portfolio_website/blob/main/src/components/Aboutme/AboutMe.js"
    click SkillsSec "https://github.com/rohangoyal37/portfolio_website/blob/main/src/components/Skills/Skills.js"
    click ExperienceSec "https://github.com/rohangoyal37/portfolio_website/blob/main/src/components/Experience/Experience.js"
    click EducationSec "https://github.com/rohangoyal37/portfolio_website/blob/main/src/components/Education/Education.js"
    click ProjectsSec "https://github.com/rohangoyal37/portfolio_website/blob/main/src/components/Projects/Projects.js"
    click CertificationsSec "https://github.com/rohangoyal37/portfolio_website/blob/main/src/components/Certification/Certifications.js"
    click ResumeSec "https://github.com/rohangoyal37/portfolio_website/blob/main/src/components/Resume/Resume.js"
    click ContactSec "https://github.com/rohangoyal37/portfolio_website/blob/main/src/components/contact/contact.js"

    %% Data Files
    SkillsSec --> SkillsData
    ProjectsSec --> ProjectsData
    CertificationsSec --> CertData

    SkillsData["Skills.json"]:::data
    click SkillsData "https://github.com/rohangoyal37/portfolio_website/blob/main/src/components/Skills/Skills.json"

    ProjectsData["projects.json"]:::data
    click ProjectsData "https://github.com/rohangoyal37/portfolio_website/blob/main/src/components/Projects/projects.json"

    CertData["certifications.json"]:::data
    click CertData "https://github.com/rohangoyal37/portfolio_website/blob/main/src/components/Certification/certifications.json"

    %% Footer
    Footer["Footer"]:::frontend
    click Footer "https://github.com/rohangoyal37/portfolio_website/blob/main/src/components/Footer/Footer.js"

    %% External Services
    subgraph "External Services"
        EmailJS["EmailJS API"]:::external
        GoogleMaps["Google Maps JS API"]:::external
    end

    ContactSec -->|“HTTPS POST”| EmailJS
    ContactSec -->|“JS Load & Data”| GoogleMaps

    %% Styles
    classDef frontend fill:#D0E8FF,stroke:#0366d6,color:#0366d6
    classDef build fill:#DFFFE0,stroke:#28a745,color:#28a745
    classDef external fill:#FFF4E0,stroke:#d97706,color:#d97706
    classDef data fill:#FFF1F0,stroke:#cb2431,color:#cb2431
```
