# sameehvv/personal_blog architecture

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

- Interactive diagram: https://gitdiagram.com/sameehvv/personal_blog
- Repository: https://github.com/sameehvv/personal_blog

## Overview

##### Project Overview and Purpose
- Structure: The project is clearly a front-end application, likely a personal or project portfolio/landing page that includes a series of blogs, project showcases, and integration with external services (e.g., Discord, GitHub, LinkedIn, Twitter, HTB, etc.). It uses React components with JSX/TSX (as seen in components like App.jsx, Block.tsx, Blog.tsx, etc.), and it is built and bundled using Vite. Styling is managed via Tailwind (see tailwind.config.js and index.css), and assets are organized under public/ and dist/ directories.
- Purpose: The site appears to deliver content (blogs, certificates, projects) through a modern, component-based, single-page application (SPA) architecture.

##### Analyzing the File Structure
- Top-Level Files and Directories:
- index.html and public/: The entry point for the static site that hosts assets like blogs and images.
- src/: Contains the application source code including the main entry point (main.jsx) and all the React components (App.jsx and components folder). The src/data folder holds content data (e.g., blogsData.ts).
- dist/: The distribution folder created after building the project which includes optimized assets (CSS, JS, images, blogs, etc.).
- Configuration files such as vite.config.js, tailwind.config.js, postcss.config.cjs indicate build and style configuration.
- Patterns:
- There is a clear separation of concerns: static content (public and dist), source code (src), and build tools/configurations.
- The component-based design (App.jsx leading to multiple smaller UI components) follows typical React/SPA patterns.

##### Key Architectural Components
a. Client/Web Browser:
- Users load the index.html which then executes the bundled JavaScript.
b. Build and Bundling Process:
- Vite is used to bundle source code from the src/ directory into optimized assets (dist/).
c. UI Components:
- React components (e.g., Navbar, Blog, BlogList, Projects, etc.) build the structure of the page.
d. Data and Content:
- The src/data folder provides blog data and possibly other static content that the UI components consume.
e. Static Assets:
- Images, CSS, and blog markdown files (located in public/blogs and public/images) are part of the content delivery.

##### Relationships and Data Flow
- The entry file, index.html (or public/index.html if used), bootstraps the main script (main.jsx) which initializes the App component.
- The App component coordinates rendering by combining several UI components (Navbar, Blog, Projects, etc.).
- Data (e.g., blog data from blogsData.ts) flows into components like BlogList and BlogView to display dynamic content.
- The build process (facilitated by Vite) takes the raw source code (src/) and generates a production-ready dist/ folder containing bundled assets.

## Diagram (Mermaid)

```mermaid
graph TD
    %% Global nodes
    A["User / Web Browser"]:::web

    %% Static Assets & Distribution
    subgraph "Static Assets & Distribution"
        B["index.html (Public)"]:::static
        C["Public Assets (public/)"]:::static
        D["Distribution Assets (dist/)"]:::static
    end

    %% Build and Bundling Process
    subgraph "Build and Bundling Process"
        E["Vite Bundler"]:::build
        F["Tailwind CSS"]:::build
        F2["Index CSS"]:::build
        G["PostCSS"]:::build
    end

    %% React Application
    subgraph "React Application"
        H["Main Loader (main.jsx)"]:::react
        I["App Container (App.jsx)"]:::react
        %% UI Components subgraph
        subgraph "UI Components"
            J["Navbar"]:::ui
            K["Blog"]:::ui
            L["BlogList"]:::ui
            M["BlogView"]:::ui
            N["Projects"]:::ui
            O["Certificates"]:::ui
            P["Discord"]:::ui
            Q["GitHub"]:::ui
            R["LinkedIn"]:::ui
            S["Twitter"]:::ui
            T["HTB"]:::ui
            U["THM"]:::ui
            V["Block"]:::ui
            W["HeaderBlock"]:::ui
            X["Checklist"]:::ui
            Y["RevealBento"]:::ui
            Z["NotFound"]:::ui
        end
        AA["Data Layer (blogsData)"]:::data
    end

    %% Relationships and Data Flow
    A -->|"loads"| B
    B -->|"bootstraps"| H
    H -->|"initializes"| I
    I -->|"renders"| J
    I -->|"renders"| K
    I -->|"renders"| L
    I -->|"renders"| M
    I -->|"renders"| N
    I -->|"renders"| O
    I -->|"renders"| P
    I -->|"renders"| Q
    I -->|"renders"| R
    I -->|"renders"| S
    I -->|"renders"| T
    I -->|"renders"| U
    I -->|"renders"| V
    I -->|"renders"| W
    I -->|"renders"| X
    I -->|"renders"| Y
    I -->|"renders"| Z
    AA -->|"supplies data to"| L
    AA -->|"supplies data to"| M

    %% Build process generates optimized assets
    E -->|"bundles to"| D
    F -->|"applies styling to"| D
    F2 -->|"applies styling from"| D
    G -->|"processes CSS for"| D

    %% Styling classes
    classDef web fill:#f4c2c2,stroke:#333,stroke-width:2px;
    classDef static fill:#c2d6f4,stroke:#333,stroke-width:2px;
    classDef build fill:#d6f4c2,stroke:#333,stroke-width:2px;
    classDef react fill:#f4e1c2,stroke:#333,stroke-width:2px;
    classDef ui fill:#e1c2f4,stroke:#333,stroke-width:2px;
    classDef data fill:#c2f4e1,stroke:#333,stroke-width:2px;

    %% Click Events
    click B "https://github.com/sameehvv/personal_blog/blob/main/index.html"
    click D "https://github.com/sameehvv/personal_blog/blob/main/dist/index.html"
    click E "https://github.com/sameehvv/personal_blog/blob/main/vite.config.js"
    click F "https://github.com/sameehvv/personal_blog/blob/main/tailwind.config.js"
    click F2 "https://github.com/sameehvv/personal_blog/blob/main/src/index.css"
    click G "https://github.com/sameehvv/personal_blog/blob/main/postcss.config.cjs"
    click H "https://github.com/sameehvv/personal_blog/blob/main/src/main.jsx"
    click I "https://github.com/sameehvv/personal_blog/blob/main/src/App.jsx"
    click J "https://github.com/sameehvv/personal_blog/blob/main/src/components/Navbar.tsx"
    click K "https://github.com/sameehvv/personal_blog/blob/main/src/components/Blog.tsx"
    click L "https://github.com/sameehvv/personal_blog/blob/main/src/components/BlogList.tsx"
    click M "https://github.com/sameehvv/personal_blog/blob/main/src/components/BlogView.tsx"
    click N "https://github.com/sameehvv/personal_blog/blob/main/src/components/Projects.tsx"
    click O "https://github.com/sameehvv/personal_blog/blob/main/src/components/Certs.tsx"
    click P "https://github.com/sameehvv/personal_blog/blob/main/src/components/DiscordStatusBox.tsx"
    click Q "https://github.com/sameehvv/personal_blog/blob/main/src/components/Github.tsx"
    click R "https://github.com/sameehvv/personal_blog/blob/main/src/components/Linkedin.tsx"
    click S "https://github.com/sameehvv/personal_blog/blob/main/src/components/Twitter.tsx"
    click T "https://github.com/sameehvv/personal_blog/blob/main/src/components/HTB.tsx"
    click U "https://github.com/sameehvv/personal_blog/blob/main/src/components/THM.tsx"
    click V "https://github.com/sameehvv/personal_blog/blob/main/src/components/Block.tsx"
    click W "https://github.com/sameehvv/personal_blog/blob/main/src/components/HeaderBlock.tsx"
    click X "https://github.com/sameehvv/personal_blog/blob/main/src/components/Checklist.tsx"
    click Y "https://github.com/sameehvv/personal_blog/blob/main/src/components/RevealBento.tsx"
    click Z "https://github.com/sameehvv/personal_blog/blob/main/src/components/NotFound.tsx"
    click AA "https://github.com/sameehvv/personal_blog/blob/main/src/data/blogsData.ts"
```
