# ashumishra2104/system-design-101 architecture

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

- Interactive diagram: https://gitdiagram.com/ashumishra2104/system-design-101
- Repository: https://github.com/ashumishra2104/system-design-101

## Overview

##### Project Type and Purpose
- This is a content‐centric repository for “System Design 101,” housing Markdown guides and category files.
- It’s not a full‐stack web app or microservice; rather, it’s a static content repo combined with a lightweight build step (the `scripts/readme.ts`) and a CI workflow for onboarding contributors.

##### Main Components
a. Content Directory (“data/…”)
- All the Markdown source files, organized under `data/categories/` and `data/guides/`.
b. Build Script (`scripts/readme.ts`)
- A TypeScript utility that reads the `data/` folder structure and regenerates the top‐level `README.md`.
c. Package Configuration (`package.json` + `pnpm-lock.yaml`)
- Defines dependencies (e.g., `typescript`, `ts-node`) to run the script.
d. Version Control & CI (`.github/workflows/welcome.yml`)
- A GitHub Actions workflow for contributor onboarding messages.
- (Potentially other CI steps could be added for linting or publishing.)
e. External Hosting / Consumption
- The static content is consumed via links on the ByteByteGo blog site (and syndicated to YouTube and newsletter).

##### Relationships & Data Flow
1) Developer edits / adds Markdown files under `data/`.
2) Developer commits & pushes to GitHub.
3) (Optional) A CI workflow runs:
- Executes `pnpm install && ts-node scripts/readme.ts` to regenerate `README.md`.
- Validates link formats or folder structure (could be added).
4) Updated `README.md` is committed back or automatically merged.
5) The static site generator (external to this repo) picks up these Markdown files to publish on the blog.
6) End users browse the ByteByteGo website, following links to each guide.

##### Architectural Patterns & Principles
- Single Responsibility:
- `data/` holds pure content.
- `scripts/readme.ts` holds content‐to‐README logic.
- CI as “Quality Gate”: ensures consistency of repository state.
- Separation of Concerns: content, build logic, and hosting are decoupled.

##### Additional Recommendations
- Keep it clean: group all on‐repo artifacts on the left, CI in the center, and external consumption on the right.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Developer
    Dev["Developer"]:::external

    %% GitHub Repository Group
    subgraph "GitHub Repository" 
        direction TB
        MD_Cat["Markdown Categories\n(data/categories/)"]:::onrepo
        MD_Guides["Markdown Guides\n(data/guides/)"]:::onrepo
        Build["Build Script\n(scripts/readme.ts)"]:::onrepo
        PKG_JSON["package.json"]:::onrepo
        PNPM_LOCK["pnpm-lock.yaml"]:::onrepo
        CI["CI Workflow\n(.github/workflows/welcome.yml)"]:::onrepo
        README["README.md"]:::onrepo
        CONTRIB["CONTRIBUTING.md"]:::onrepo
        GITIGNORE[".gitignore"]:::onrepo
        LICENSE["LICENSE.md"]:::onrepo
    end

    %% External Services
    Host["Static Site Host\n(ByteByteGo Blog)"]:::external
    User["End User"]:::external

    %% Connections
    Dev -->|"push"| MD_Cat
    Dev -->|"push"| MD_Guides
    Dev -->|"push"| Build
    Dev -->|"push"| PKG_JSON
    Dev -->|"push"| PNPM_LOCK
    Dev -->|"push"| CONTRIB
    Dev -->|"push"| GITIGNORE
    Dev -->|"push"| LICENSE

    MD_Cat -->|"stored in repo"| Host
    MD_Guides -->|"stored in repo"| Host

    CI -->|"runs script"| Build
    CI -->|"uses packages"| PKG_JSON
    CI -->|"uses lockfile"| PNPM_LOCK
    Build -->|"regenerates"| README

    Host -->|"browse content"| User

    %% Optional Linting Step
    CI -.->|"optional linting"| MD_Cat
    CI -.->|"optional linting"| MD_Guides

    %% Click Events
    click MD_Cat "https://github.com/ashumishra2104/system-design-101/tree/main/data/categories/"
    click MD_Guides "https://github.com/ashumishra2104/system-design-101/tree/main/data/guides/"
    click Build "https://github.com/ashumishra2104/system-design-101/blob/main/scripts/readme.ts"
    click PKG_JSON "https://github.com/ashumishra2104/system-design-101/blob/main/package.json"
    click PNPM_LOCK "https://github.com/ashumishra2104/system-design-101/blob/main/pnpm-lock.yaml"
    click CI "https://github.com/ashumishra2104/system-design-101/blob/main/.github/workflows/welcome.yml"
    click README "https://github.com/ashumishra2104/system-design-101/blob/main/README.md"
    click CONTRIB "https://github.com/ashumishra2104/system-design-101/blob/main/CONTRIBUTING.md"
    click GITIGNORE "https://github.com/ashumishra2104/system-design-101/blob/main/.gitignore"
    click LICENSE "https://github.com/ashumishra2104/system-design-101/blob/main/LICENSE.md"

    %% Styles
    classDef onrepo fill:#D0E8FF,stroke:#0288D1,color:#000
    classDef external fill:#D0FFD6,stroke:#2E7D32,color:#000
    classDef optional stroke-dasharray: 5 5,stroke:#555,color:#555
```
