# raghavxkatta/raghavkatta architecture

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

- Interactive diagram: https://gitdiagram.com/raghavxkatta/raghavkatta
- Repository: https://github.com/raghavxkatta/raghavkatta

## Overview

##### Project type and purpose
- This is a front-end–only, single-page portfolio application.
- It uses React (SPA framework), Tailwind CSS, Framer Motion, Lenis, and is deployed as static assets via Vercel.
- Purpose: showcase the developer’s work, skills, contact info, and animated experience.

##### File structure
- Top level:
- package.json / package-lock.json, Vite/Tailwind/Vercel config files, README.md
- public/: index.html + static images/assets served at root
- src/:
– assets/: images/media
– components/: UI sections (Hero, About, Projects, Skills, etc.)
– context/: ThemeContext for global state
– App.jsx & main.jsx: React entry points
– index.css / App.css: Tailwind & global styles
- Build/config: vite.config.js, tailwind.config.js, eslint.config.js
- Deployment: Vercel integration (.vercel/ not shown in file tree but noted in README)

##### README for additional insights
- CI/CD: GitHub → Vercel
- Live URL: served over CDN

##### Components
a. Developer & Source Control
- Developer’s local environment (IDE, npm scripts: dev, build, preview, lint)
- GitHub repo
b. CI/CD / Build Pipeline
- Vercel build step invoking Vite → produces /dist (static bundle: index.html, app.js, CSS)
c. Hosting & Delivery
- Vercel (CDN edge nodes) serving index.html and static assets
d. Client-side runtime (Browser)
- Loads index.html → main.jsx mounts <App/> at root
- App.jsx wraps everything in ThemeContext
- Components hierarchy: Header, Hero, About, Skills, Projects, ContactTerminal, Footer, etc.
- Styling: Tailwind CSS classes, global CSS
- Animations & interactions: Framer Motion, Lenis for smooth scrolling, React Toast for notifications
- Assets fetched from /assets folder on CDN
e. External integrations (if any)
- GitHub Stats component may fetch GitHub APIs
- ContactTerminal may send email or integrate with form backend (if configured)

##### Relationships and data flows
- Developer → (push) → GitHub → (webhook) → Vercel
- Vercel → (run) → Vite build → outputs dist → deploy to CDN
- Browser → (GET) → CDN → index.html + JS/CSS → Browser executes React app
- React app → (renders) → components → (use) → assets, contexts, animations libraries
- Any API calls: e.g. GithubStats component → GitHub REST API

##### Architectural patterns & principles
- SPA served as static assets (no server-side logic)
- Component-based UI (React)
- Global state via React Context (ThemeContext)
- Utility-first styling (Tailwind)
- Animation layer abstracted (Framer Motion + Lenis)
- CI/CD for zero-downtime static deployments

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Developer & Source Control
    Dev["Developer Local Environment<br/>(IDE, npm scripts)"]:::external
    GH["GitHub Repository"]:::external

    Dev -->|push| GH
    GH -->|webhook trigger| Vercel

    %% CI/CD & Build Pipeline
    subgraph "CI/CD & Build" 
        Vercel["Vercel"]:::pipeline
        Vite["Vite Build"]:::pipeline
        Dist["Dist (Static Bundle)"]:::config
    end
    Vercel -->|run build| Vite
    Vite -->|output dist| Dist
    Dist -->|deploy| CDN

    click Dist "https://github.com/raghavxkatta/raghavkatta/blob/main/README.md"

    %% Hosting & Delivery
    CDN["CDN / Edge Nodes"]:::cdn
    Dist -->|serve assets| CDN

    %% Client-side Runtime
    Browser["Browser"]:::external
    Browser -->|GET index.html, JS, CSS| CDN
    CDN -->|deliver index.html| AppShell

    subgraph "Client Runtime" 
        AppShell["index.html"]:::config
        Main["main.jsx"]:::frontend
        AppComp["App.jsx"]:::frontend
        Theme["ThemeContext"]:::frontend
        Assets["Static Assets\n(src/assets/)"]:::config
        
        AppShell -->|bootstraps| Main
        Main -->|mounts <App/>| AppComp
        AppComp -->|wraps with| Theme
        
        subgraph "UI Components"
            Header["Header.jsx"]:::frontend
            Footer["Footer.jsx"]:::frontend
            Separation["Seperation.jsx"]:::frontend
            Hero["Hero.jsx"]:::frontend
            AnimatedBtn["AnimatedButton.jsx"]:::frontend
            About["About.jsx"]:::frontend
            Skills["Skills.jsx"]:::frontend
            Projects["Projects.jsx"]:::frontend
            GitStats["GithubStats.jsx"]:::frontend
            CodeStats["CodingStats.jsx"]:::frontend
            Contact["ContactTerminal.jsx"]:::frontend
            Lenis["LenisScroll.jsx"]:::frontend
            Particle["Particle.jsx"]:::frontend
            Snow["SnowParticle.jsx"]:::frontend
        end

        AppComp -->|renders| Header
        AppComp --> Hero
        Hero --> AnimatedBtn
        AppComp --> About
        AppComp --> Skills
        AppComp --> Projects
        AppComp --> GitStats
        AppComp --> CodeStats
        AppComp --> Contact
        AppComp --> Footer
        AppComp --> Separation
        AppComp --> Lenis
        AppComp --> Particle
        AppComp --> Snow
        AppComp -->|loads| Assets
    end

    %% External Integrations
    GitStats -->|fetch| GitAPI
    CodeStats -->|fetch| GitAPI
    Contact -->|send email| EmailService

    GitAPI["GitHub REST API"]:::external
    EmailService["Email/Form Backend"]:::external

    %% Click Events for component mapping
    click Main "https://github.com/raghavxkatta/raghavkatta/blob/main/src/main.jsx"
    click AppComp "https://github.com/raghavxkatta/raghavkatta/blob/main/src/App.jsx"
    click Theme "https://github.com/raghavxkatta/raghavkatta/blob/main/src/context/ThemeContext.jsx"
    click Header "https://github.com/raghavxkatta/raghavkatta/blob/main/src/components/Header.jsx"
    click Footer "https://github.com/raghavxkatta/raghavkatta/blob/main/src/components/Footer.jsx"
    click Separation "https://github.com/raghavxkatta/raghavkatta/blob/main/src/components/Seperation.jsx"
    click Hero "https://github.com/raghavxkatta/raghavkatta/blob/main/src/components/Hero.jsx"
    click AnimatedBtn "https://github.com/raghavxkatta/raghavkatta/blob/main/src/components/AnimatedButton.jsx"
    click About "https://github.com/raghavxkatta/raghavkatta/blob/main/src/components/About.jsx"
    click Skills "https://github.com/raghavxkatta/raghavkatta/blob/main/src/components/Skills.jsx"
    click Projects "https://github.com/raghavxkatta/raghavkatta/blob/main/src/components/Projects.jsx"
    click GitStats "https://github.com/raghavxkatta/raghavkatta/blob/main/src/components/GithubStats.jsx"
    click CodeStats "https://github.com/raghavxkatta/raghavkatta/blob/main/src/components/CodingStats.jsx"
    click Contact "https://github.com/raghavxkatta/raghavkatta/blob/main/src/components/ContactTerminal.jsx"
    click Lenis "https://github.com/raghavxkatta/raghavkatta/blob/main/src/components/LenisScroll.jsx"
    click Particle "https://github.com/raghavxkatta/raghavkatta/blob/main/src/components/Particle.jsx"
    click Snow "https://github.com/raghavxkatta/raghavkatta/blob/main/src/components/SnowParticle.jsx"
    click Assets "https://github.com/raghavxkatta/raghavkatta/tree/main/src/assets/"
    click AppShell "https://github.com/raghavxkatta/raghavkatta/blob/main/public/index.html"
    click Dist "https://github.com/raghavxkatta/raghavkatta/tree/main/dist"
    click Vercel "https://github.com/raghavxkatta/raghavkatta/tree/main/.vercel/"
    click Vite "https://github.com/raghavxkatta/raghavkatta/blob/main/vite.config.js"
    click Dev "https://github.com/raghavxkatta/raghavkatta/blob/main/package.json"

    %% Styling
    classDef frontend fill:#D0E8FF,stroke:#2B6CB0,stroke-width:1px;
    classDef config fill:#F0FFF4,stroke:#38A169,stroke-width:1px,stroke-dasharray: 5 5;
    classDef pipeline fill:#FFF5D1,stroke:#D69E2E,stroke-width:1px;
    classDef cdn fill:#E9D8FD,stroke:#805AD5,stroke-width:1px;
    classDef external fill:#EDF2F7,stroke:#A0AEC0,stroke-width:1px;
```
