# pottekkat/personal-website architecture

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

- Interactive diagram: https://gitdiagram.com/pottekkat/personal-website
- Repository: https://github.com/pottekkat/personal-website

## Overview

Based on our review of both the file tree and README, this project is the source for a personal website (navendu.me) built with Hugo and a highly personalized version of the Hugo PaperMod theme. The website is content rich (with posts, dailies, newsletters, and TILs), and it uses various assets (CSS, JavaScript, images) along with custom scripts for managing front matter, deployments, and even some minor Go code. There’s also a CI/CD setup using GitHub workflows and integration with Netlify for hosting.

##### Main Components
- Content Repository: Show “content”, “archetypes”, and “data” folders – these are where all the textual/blog content and structured data (like stats) reside.
- Assets & Static Files: Include “assets” (with subfolders for CSS and JS) and “static” (images, web manifest, etc.). These serve as the front-end cosmetics and resources for the site.
- Layouts & Templates: Represent the “layouts” folder (and its subfolders like _default, partials, shorts codes, etc.) which define how content is rendered into HTML.
- Build System (Hugo): Indicate Hugo (the static site generator) as the build engine that takes content (from content, assets, etc.) and layout instructions to produce the final static site.
- Custom Scripts & Tools: Note the “scripts” folder and use of “cmd/main.go” (and other language-specific scripts in “.github” and “frontmatter” directories) that help with front matter processing, content management, and possibly custom build steps.

##### Relationships & Data Flow
- How custom scripts (frontmatter adjustments, Go programs) interact with the content repository as pre- or post-processing tools.
- Deployment flow: from the committed repository triggering GitHub workflows that eventually push the final static files to Netlify.
- How the end user (web browser) accesses content served from the Netlify-hosted site.

##### Architectural Patterns & Design Principles
- Static Site Generation: Emphasize that the site is built using a static site generation pattern where content is pre-rendered.
- Separation of Concerns: Distinguish clearly between content (markdown files, JSON data), presentation (layouts, CSS, JavaScript), and build orchestration (Hugo, CI scripts).
- Personalization Layer: Note that the project uses a highly personalized version of the Hugo PaperMod theme – which means that while following PaperMod’s structure, further customizations are applied.

- Content (content folder, archetypes, data)
- Presentation (assets, static, layouts)
- Custom Tools & Scripts (scripts folder, cmd/main.go, frontmatter)

## Diagram (Mermaid)

```mermaid
graph TD
    VC["Version Control (.gitignore)"]:::version
    Repo["Source Repository"]:::repo

    subgraph "Repository Internal Structure"
        subgraph "Content & Data"
            C1["Content"]:::content
            C2["Archetypes"]:::content
            C3["Data"]:::content
        end
        subgraph "Presentation & Assets"
            P1["Assets"]:::assets
            P2["Static"]:::assets
            P3["Layouts"]:::assets
        end
        subgraph "Custom Tools"
            T1["Scripts"]:::tools
            T2["Frontmatter"]:::tools
        end
    end

    VC --> Repo

    Repo -->|"ProvidesInput"| HB["Hugo Build Engine"]:::build

    subgraph "Build System (Hugo)"
        HC["config.yml"]:::buildComponent
        GM["cmd/main.go"]:::buildComponent
    end

    HC -->|"configures"| HB
    GM -->|"drives"| HB

    HB -->|"generates"| SSF["Static Site Files"]:::output

    Repo -->|"Triggers"| CICD["CI/CD Pipeline"]:::ci

    subgraph "CI/CD Pipeline Components"
        GH["GitHub Workflows"]:::ciComponent
        NT["netlify.toml"]:::ciComponent
    end

    CICD -->|"DeploysTo"| ND["Netlify Deployment"]:::deploy
    SSF -->|"DeployedBy"| ND

    ND -->|"Serves"| UB["User Browser"]:::user

    %% Click Events
    click C1 "https://github.com/pottekkat/personal-website/tree/hugo/content"
    click C2 "https://github.com/pottekkat/personal-website/tree/hugo/archetypes"
    click C3 "https://github.com/pottekkat/personal-website/tree/hugo/data"
    click P1 "https://github.com/pottekkat/personal-website/tree/hugo/assets"
    click P2 "https://github.com/pottekkat/personal-website/tree/hugo/static"
    click P3 "https://github.com/pottekkat/personal-website/tree/hugo/layouts"
    click T1 "https://github.com/pottekkat/personal-website/tree/hugo/scripts"
    click T2 "https://github.com/pottekkat/personal-website/tree/hugo/frontmatter"
    click GM "https://github.com/pottekkat/personal-website/blob/hugo/cmd/main.go"
    click HC "https://github.com/pottekkat/personal-website/blob/hugo/config.yml"
    click GH "https://github.com/pottekkat/personal-website/tree/hugo/.github/workflows"
    click NT "https://github.com/pottekkat/personal-website/blob/hugo/netlify.toml"
    click VC "https://github.com/pottekkat/personal-website/blob/hugo/.gitignore"

    %% Styles
    classDef version fill:#f8d7da,stroke:#721c24,stroke-width:2px;
    classDef repo fill:#e2ecf9,stroke:#0d6efd,stroke-width:2px;
    classDef content fill:#d1ecf1,stroke:#0c5460,stroke-width:2px;
    classDef assets fill:#d4edda,stroke:#155724,stroke-width:2px;
    classDef tools fill:#fff3cd,stroke:#856404,stroke-width:2px;
    classDef build fill:#cce5ff,stroke:#004085,stroke-width:2px;
    classDef buildComponent fill:#e2e3e5,stroke:#383d41,stroke-width:2px;
    classDef ci fill:#fefefe,stroke:#818182,stroke-width:2px;
    classDef ciComponent fill:#e2e3e5,stroke:#383d41,stroke-width:2px;
    classDef deploy fill:#d1ecf1,stroke:#0c5460,stroke-width:2px;
    classDef output fill:#d4edda,stroke:#155724,stroke-width:2px;
    classDef user fill:#fff3cd,stroke:#856404,stroke-width:2px;
```
