# ummitc/links architecture

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

- Interactive diagram: https://gitdiagram.com/ummitc/links
- Repository: https://github.com/ummitc/links

## Overview

##### Project type and purpose
- This is a single‐page, static, front-end landing site built with React + Vite (TypeScript).
- It serves as a minimalist “digital business card”—a Linktree-style personal page—hosted on GitHub Pages.
- CI/CD is handled via GitHub Actions; versioning by semantic-release.

##### File structure
- Top level:
- public/ → static assets and redirect rules
- src/ → React components (App.tsx, pages, components, hooks, styles)
- index.html, package.json, vite.config.ts, tsconfig*.json
- .github/workflows/ → CI/CD definitions
- No backend code; purely client-side.
- Build target (dist/) is generated by Vite, then deployed to GitHub Pages.

##### Core components
a. Developer workstation
- Code editor, local dev server (vite)
- Yarn to install/run
b. Source Code Repository (GitHub)
- Branches: dev, master
c. CI/CD (GitHub Actions)
- Workflows:
- preview.yml → runs dev preview
- semantic-release.yml → calculates version
- yarn.yaml → runs build & deploy to GitHub Pages
d. Static Site Generator / Build System
- Vite bundler + TypeScript compiler
- PostCSS/Tailwind CSS + DaisyUI
e. Hosting
- GitHub Pages – serves dist/ as static website
f. End User / Browser
- Fetches index.html + JS/CSS from GitHub Pages
- Renders SPA, navigates routes (Home, About, Blog, Gear, Projects)

##### Relationships & Data Flow
- Developer → push commit → GitHub repo
- GitHub Actions workflows (CI/CD) triggered by push
- Build job: Vite compiles / bundles / outputs to dist
- semantic-release tags new version → updates changelog, GitHub Releases
- Deployment job: dist folder → GitHub Pages
- End user browser → HTTP GET → GitHub Pages → serves files → React SPA initializes

##### Architectural patterns & design principles
- Component-based UI (React) with folder separation: pages vs. shared components
- Static site generation / SPA served as static assets
- GitOps / Git-driven CI/CD: Infrastructure (hosting) changes via code commits
- Conventional commits + semantic-release for automated versioning

##### Technologies & frameworks
- React + TypeScript + Vite
- Tailwind CSS + DaisyUI (CSS utility / component library)
- Yarn 4, Node.js
- GitHub Actions, semantic-release
- GitHub Pages

##### Essential elements to capture
- Separation of concerns: source code vs. build vs. hosting
- Data (file) flow from developer to end user
- CI/CD pipeline stages: build, version, deploy
- Client-side routing and component hierarchy (optional detail)

## Diagram (Mermaid)

```mermaid
flowchart TD
    Developer["Developer Workstation<br/>(Code Editor & Vite Dev Server)"]:::code
    Developer -->|push commit| GitHubRepo

    subgraph "GitHub Repository"
        GitHubRepo["GitHub Repo<br/>(branches: dev, master)"]:::repo
        LICENSE["LICENSE"]:::repo
        README["README.md"]:::repo
    end

    GitHubRepo --> CI["CI/CD (GitHub Actions)"]:::ci

    subgraph "GitHub Actions Workflows"
        Preview["preview.yml"]:::ci
        Semantic["semantic-release.yml"]:::ci
        BuildDeploy["yarn.yaml"]:::ci
    end

    CI --> Preview
    CI --> Semantic
    CI --> BuildDeploy

    Preview --> ViteBuild["Vite Build<br/>(Vite + TS + Tailwind + DaisyUI)"]:::build
    Semantic --> Version["semantic-release"]:::ci
    BuildDeploy --> DeployJob["Deploy to GitHub Pages"]:::ci

    ViteBuild --> Dist["dist/"]:::build
    DeployJob --> GitHubPages

    subgraph "Hosting"
        GitHubPages["GitHub Pages"]:::hosting
    end

    Browser["End User Browser"]:::browser
    Browser -->|HTTP GET| GitHubPages
    GitHubPages -->|serves SPA| SPA["React SPA"]:::code

    subgraph "Source Code (src/)"
        Main["main.tsx"]:::code
        AppComp["App.tsx"]:::code

        subgraph "Pages"
            Home["HomePage.tsx"]:::code
            About["AboutPage.tsx"]:::code
            Blog["BlogPage.tsx"]:::code
            Gear["GearPage.tsx"]:::code
            Project["ProjectPage.tsx"]:::code
        end

        subgraph "Components"
            Navbar["Navbar.tsx"]:::code
            Footer["Footer.tsx"]:::code
            Links["Links.tsx"]:::code
            Background["BackgroundWallpaper.tsx"]:::code
            Zoom["CustomZoom.tsx"]:::code
            GPG["GPGModal/index.tsx"]:::code
        end
    end

    SPA --> Main
    Main --> AppComp
    AppComp --> Home
    AppComp --> About
    AppComp --> Blog
    AppComp --> Gear
    AppComp --> Project
    AppComp --> Navbar
    AppComp --> Footer
    AppComp --> Links
    AppComp --> Background
    AppComp --> Zoom
    AppComp --> GPG

    subgraph "Config & Tooling"
        Package["package.json"]:::code
        ViteConfig["vite.config.ts"]:::code
        TSConfig["tsconfig.json"]:::code
        PostCSS["postcss.config.js"]:::code
    end

    GitHubRepo --> Package
    GitHubRepo --> ViteConfig
    GitHubRepo --> TSConfig
    GitHubRepo --> PostCSS

    click Main "https://github.com/ummitc/links/blob/master/src/main.tsx"
    click AppComp "https://github.com/ummitc/links/blob/master/src/App.tsx"
    click Home "https://github.com/ummitc/links/blob/master/src/pages/HomePage.tsx"
    click About "https://github.com/ummitc/links/blob/master/src/pages/AboutPage.tsx"
    click Blog "https://github.com/ummitc/links/blob/master/src/pages/BlogPage.tsx"
    click Gear "https://github.com/ummitc/links/blob/master/src/pages/GearPage.tsx"
    click Project "https://github.com/ummitc/links/blob/master/src/pages/ProjectPage.tsx"
    click Navbar "https://github.com/ummitc/links/blob/master/src/components/Navbar.tsx"
    click Footer "https://github.com/ummitc/links/blob/master/src/components/Footer.tsx"
    click Links "https://github.com/ummitc/links/blob/master/src/components/Links.tsx"
    click Background "https://github.com/ummitc/links/blob/master/src/components/BackgroundWallpaper.tsx"
    click Zoom "https://github.com/ummitc/links/blob/master/src/components/CustomZoom.tsx"
    click GPG "https://github.com/ummitc/links/blob/master/src/components/GPGModal/index.tsx"
    click Package "https://github.com/ummitc/links/blob/master/package.json"
    click ViteConfig "https://github.com/ummitc/links/blob/master/vite.config.ts"
    click TSConfig "https://github.com/ummitc/links/blob/master/tsconfig.json"
    click PostCSS "https://github.com/ummitc/links/blob/master/postcss.config.js"

    classDef repo fill:#cce5ff,stroke:#004085;
    classDef code fill:#e2e3e5,stroke:#6c757d;
    classDef ci fill:#fff3cd,stroke:#856404;
    classDef build fill:#e2e3e5,stroke:#6c757d;
    classDef hosting fill:#d4edda,stroke:#155724;
    classDef browser fill:#f8f9fa,stroke:#6c757d;
```
