# kstubhieeee/kaustubh-portfolio architecture

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

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

## Overview

##### Project Type and Purpose
- The project is a personal portfolio website that showcases the developer’s skills, projects, experience (including blog posts and GitHub stats), and interactive UI elements.

##### Analyzing the File Structure
- Entry Point and Build Setup:
- index.html: The static HTML shell.
- src/main.tsx: The main entry file that bootstraps the React application.
- vite.config.ts: Configuration for the Vite build tool.
- UI Components:
- The src/components directory contains a variety of React components (e.g., BlogCard, ContactForm, GitHubStats, Navbar, etc.). These represent the visual and interactive elements of the portfolio.
- Pages and Routing:
- The src/pages directory holds different pages such as HomePage, BlogPage, BlogPost, GitHubPage, and NewBlogPost. These define the major routes available in the application.
- State and Context Management:
- The src/context directory (with ThemeContext.tsx) represents global state management for themes (and possibly other UI state), integrating with many of the components.
- Static Data:
- The src/data directory (e.g., blogs.ts) likely holds static or semi-static data used by the blog components.
- Configuration and Tooling:
- Files such as package.json, tailwind.config.js, tsconfig files, and eslint.config.js indicate development tooling, styling (Tailwind CSS), and linting rules that are integral to the project’s workflow and could be annotated as part of the build/deployment environment.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Global Client Node
    BrowserClient["Browser/Client"]:::client

    %% Core Application Nodes
    indexHTML["Static HTML Shell (index.html)"]:::frontend
    ReactEntry["React App (src/main.tsx)"]:::frontend

    %% Global State and Data
    ThemeContext["ThemeContext (src/context/ThemeContext.tsx)"]:::logic
    BlogData["Blog Data (src/data/blogs.ts)"]:::logic

    %% Optional Backend Service
    BackendService["Backend Service (Node.js/Express)"]:::backend

    %% Build & Deployment Group
    subgraph "Build & Deployment"
        Build_Vite["Vite (vite.config.ts)"]:::build
        Build_Tailwind["Tailwind CSS (tailwind.config.js)"]:::build
        Build_PostCSS["PostCSS (postcss.config.js)"]:::build
        Build_TSC_app["TS Config (tsconfig.app.json)"]:::build
        Build_TSC["TS Config (tsconfig.json)"]:::build
        Build_TSC_node["TS Config (tsconfig.node.json)"]:::build
        Build_Package["Package Management (package.json)"]:::build
        Build_Lint["Linting (eslint.config.js)"]:::build
    end

    %% Pages and Routing Layer
    subgraph "Pages (Routing Layer)"
        P_HomePage_Route["HomePage (src/pages/HomePage.tsx)"]:::frontend
        P_BlogPage["BlogPage (src/pages/BlogPage.tsx)"]:::frontend
        P_BlogPost["BlogPost (src/pages/BlogPost.tsx)"]:::frontend
        P_GitHubPage["GitHubPage (src/pages/GitHubPage.tsx)"]:::frontend
        P_NewBlogPost["NewBlogPost (src/pages/NewBlogPost.tsx)"]:::frontend
    end

    %% UI Components (Presentation Layer)
    subgraph "UI Components (Presentation Layer)"
        UI_BlogCard["BlogCard"]:::frontend
        UI_Comets["Comets"]:::frontend
        UI_ContactForm["ContactForm"]:::frontend
        UI_EducationCard["EducationCard"]:::frontend
        UI_GitHubStats["GitHubStats"]:::frontend
        UI_HomePage_Component["HomePage"]:::frontend
        UI_Logo["Logo"]:::frontend
        UI_Navbar["Navbar"]:::frontend
        UI_ProjectCard["ProjectCard"]:::frontend
        UI_Scene["Scene"]:::frontend
        UI_SectionHeader["SectionHeader"]:::frontend
        UI_SkillIcons["SkillIcons"]:::frontend
        UI_SkillsSection["SkillsSection"]:::frontend
        UI_StarField["StarField"]:::frontend
        UI_Terminal["Terminal"]:::frontend
        UI_ThemeToggle["ThemeToggle"]:::frontend
        UI_Timeline["Timeline"]:::frontend
        UI_TypewriterHero["TypewriterHero"]:::frontend
    end

    %% Connections

    %% Browser to Application
    BrowserClient -->|"loads"| indexHTML
    indexHTML -->|"bootstraps"| ReactEntry

    %% React Application loads Pages
    ReactEntry -->|"renders"| P_HomePage_Route
    ReactEntry -->|"renders"| P_BlogPage
    ReactEntry -->|"renders"| P_BlogPost
    ReactEntry -->|"renders"| P_GitHubPage
    ReactEntry -->|"renders"| P_NewBlogPost

    %% Pages composition relationships with UI Components
    P_HomePage_Route -->|"includes"| UI_Navbar
    P_HomePage_Route -->|"includes"| UI_HomePage_Component
    P_HomePage_Route -->|"includes"| UI_TypewriterHero

    P_BlogPage -->|"includes"| UI_BlogCard
    P_BlogPost -->|"includes"| UI_BlogCard
    P_BlogPost -->|"includes"| UI_ContactForm

    P_GitHubPage -->|"includes"| UI_GitHubStats
    P_NewBlogPost -->|"includes"| UI_ContactForm

    %% Global State influence
    ThemeContext -->|"affects"| UI_ThemeToggle
    ThemeContext -->|"affects"| UI_Navbar
    ThemeContext -->|"affects"| UI_HomePage_Component

    %% Data flow
    BlogData -->|"populates"| UI_BlogCard

    %% UI Components interaction with Backend (for dynamic content)
    UI_BlogCard -->|"fetches"| BackendService

    %% Build & Deployment influences
    Build_Vite -->|"builds"| ReactEntry
    Build_Tailwind -->|"styles"| UI_Navbar
    Build_PostCSS -->|"processes"| UI_ThemeToggle
    Build_TSC_app -->|"type-checks"| ReactEntry
    Build_TSC -->|"type-checks"| UI_BlogCard
    Build_TSC_node -->|"type-checks"| BackendService
    Build_Package -->|"manages"| ReactEntry
    Build_Lint -->|"ensures code quality"| UI_ContactForm

    %% Click Events
    click indexHTML "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/index.html"
    click ReactEntry "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/src/main.tsx"
    click UI_BlogCard "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/src/components/BlogCard.tsx"
    click UI_Comets "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/src/components/Comets.tsx"
    click UI_ContactForm "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/src/components/ContactForm.tsx"
    click UI_EducationCard "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/src/components/EducationCard.tsx"
    click UI_GitHubStats "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/src/components/GitHubStats.tsx"
    click UI_HomePage_Component "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/src/components/HomePage.tsx"
    click UI_Logo "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/src/components/Logo.tsx"
    click UI_Navbar "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/src/components/Navbar.tsx"
    click UI_ProjectCard "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/src/components/ProjectCard.tsx"
    click UI_Scene "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/src/components/Scene.tsx"
    click UI_SectionHeader "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/src/components/SectionHeader.tsx"
    click UI_SkillIcons "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/src/components/SkillIcons.tsx"
    click UI_SkillsSection "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/src/components/SkillsSection.tsx"
    click UI_StarField "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/src/components/StarField.tsx"
    click UI_Terminal "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/src/components/Terminal.tsx"
    click UI_ThemeToggle "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/src/components/ThemeToggle.tsx"
    click UI_Timeline "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/src/components/Timeline.tsx"
    click UI_TypewriterHero "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/src/components/TypewriterHero.tsx"

    click P_HomePage_Route "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/src/pages/HomePage.tsx"
    click P_BlogPage "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/src/pages/BlogPage.tsx"
    click P_BlogPost "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/src/pages/BlogPost.tsx"
    click P_GitHubPage "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/src/pages/GitHubPage.tsx"
    click P_NewBlogPost "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/src/pages/NewBlogPost.tsx"

    click ThemeContext "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/src/context/ThemeContext.tsx"
    click BlogData "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/src/data/blogs.ts"

    click Build_Vite "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/vite.config.ts"
    click Build_Tailwind "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/tailwind.config.js"
    click Build_PostCSS "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/postcss.config.js"
    click Build_TSC_app "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/tsconfig.app.json"
    click Build_TSC "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/tsconfig.json"
    click Build_TSC_node "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/tsconfig.node.json"
    click Build_Package "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/package.json"
    click Build_Lint "https://github.com/kstubhieeee/kaustubh-portfolio/blob/main/eslint.config.js"

    %% Styles
    classDef client fill:#FFCCCC,stroke:#333,stroke-width:2px;
    classDef frontend fill:#CCFFCC,stroke:#333,stroke-width:2px;
    classDef logic fill:#CCCCFF,stroke:#333,stroke-width:2px;
    classDef build fill:#FFF2CC,stroke:#333,stroke-width:2px;
    classDef backend fill:#F0E68C,stroke:#333,stroke-dasharray: 5, 5,stroke-width:2px;
```
