# sumirseth/knowledge-base-web architecture

> Architecture diagram of the GitHub repository sumirseth/knowledge-base-web, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sumirseth/knowledge-base-web
- Repository: https://github.com/sumirseth/knowledge-base-web

## Overview

##### Project type and purpose
- This is a JAMstack-style, content-driven, static website built with Nuxt.js and the nuxt-content module.
- Its primary purpose is to serve a knowledge base: markdown files in `content/` get rendered into Vue pages via the catch-all routes in `pages/`.

##### File structure
- Top-level “nuxt.config.ts” and “package.json” define our Nuxt application, modules, and build scripts.
- `pages/` contains Vue components organized with catch-all routes (`[...slug].vue`) for dynamic content display.
- `content/` holds the source markdown or JSON content.
- `composables/` contains reusable logic (e.g. `useDarkMode.ts`).
- `public/` holds static assets (images, PDFs).
- `server/` can house custom server middleware (if using Nuxt Server-Side or API routes).
- Build tool config: `tailwind.config.js` for styles, TS configs, and generate script for static export.

##### README
- Confirms usage of nuxt-content as a content API during SSR/SSG.
- Outlines dev flow (`npm run dev`) and static generation (`npm run generate` → `dist/`).

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Developer Environment
    subgraph "Developer Environment"
        Dev["Developer Workstation"]:::runtime
        Git["Git Repository"]:::runtime
    end

    %% CI/CD & Build Pipeline
    subgraph "CI/CD & Build"
        CI["CI/CD Pipeline"]:::build
        NuxtApp["Nuxt.js Application Core"]:::build
        NuxtContent["Nuxt-content Module (Content API)"]:::content
        ContentStore["Content Store (content/)"]:::content
        Pages["Page-based Routing (pages/)"]:::build
        Composables["Composables Layer"]:::util
        Tailwind["Styling Engine (Tailwind CSS)"]:::build
        StaticGen["Static Generation & Build Scripts"]:::build
    end

    %% Deployment
    subgraph "Deployment"
        Dist["Static Assets (dist/)"]:::build
        CDN["CDN / Static Host"]:::runtime
    end

    %% Runtime
    subgraph "Runtime"
        Browser["End User Browser"]:::runtime
        Server["Server Middleware (server/)"]:::runtime
    end

    %% Connections
    Dev -->|push code| Git
    Git -->|trigger build| CI
    CI -->|run build| NuxtApp
    ContentStore -->|read markdown| NuxtApp
    NuxtContent -->|integrated via config| NuxtApp
    Pages -->|file-based routing| NuxtApp
    Tailwind -->|apply styles| NuxtApp
    Composables -->|included in build| NuxtApp
    NuxtApp -->|generate static| StaticGen
    StaticGen -->|output| Dist
    Dist -->|deploy| CDN
    CDN -->|serve HTML/CSS/JS| Browser
    Browser -->|request page| CDN
    Browser -->|hydrate| Browser
    Browser -->|fetch content JSON| NuxtContent
    Browser -->|use utilities| Composables
    Browser -->|call API endpoints| Server

    %% Click Events
    click NuxtApp "https://github.com/sumirseth/knowledge-base-web/blob/master/nuxt.config.ts"
    click NuxtApp "https://github.com/sumirseth/knowledge-base-web/blob/master/app.vue"
    click NuxtApp "https://github.com/sumirseth/knowledge-base-web/blob/master/package.json"
    click ContentStore "https://github.com/sumirseth/knowledge-base-web/tree/master/content/"
    click NuxtContent "https://github.com/sumirseth/knowledge-base-web/blob/master/nuxt.config.ts"
    click Pages "https://github.com/sumirseth/knowledge-base-web/blob/master/pages/[...slug].vue"
    click Pages "https://github.com/sumirseth/knowledge-base-web/blob/master/pages/about.vue"
    click Pages "https://github.com/sumirseth/knowledge-base-web/blob/master/pages/archive/[...slug].vue"
    click Pages "https://github.com/sumirseth/knowledge-base-web/blob/master/pages/archive/index.vue"
    click Pages "https://github.com/sumirseth/knowledge-base-web/blob/master/pages/books/[...slug].vue"
    click Pages "https://github.com/sumirseth/knowledge-base-web/blob/master/pages/index.vue"
    click Pages "https://github.com/sumirseth/knowledge-base-web/blob/master/pages/notes/[...slug].vue"
    click Pages "https://github.com/sumirseth/knowledge-base-web/blob/master/pages/notes/philosophy/[...slug].vue"
    click Pages "https://github.com/sumirseth/knowledge-base-web/blob/master/pages/research/[...slug].vue"
    click Pages "https://github.com/sumirseth/knowledge-base-web/blob/master/pages/search.vue"
    click Pages "https://github.com/sumirseth/knowledge-base-web/blob/master/pages/videos/[...slug].vue"
    click Composables "https://github.com/sumirseth/knowledge-base-web/blob/master/composables/useDarkMode.ts"
    click Tailwind "https://github.com/sumirseth/knowledge-base-web/blob/master/tailwind.config.js"
    click StaticGen "https://github.com/sumirseth/knowledge-base-web/blob/master/package.json"
    click StaticGen "https://github.com/sumirseth/knowledge-base-web/blob/master/package-lock.json"
    click Server "https://github.com/sumirseth/knowledge-base-web/tree/master/server/"
    click Server "https://github.com/sumirseth/knowledge-base-web/blob/master/server/tsconfig.json"

    %% Styles
    classDef build fill:#D8B4FE,stroke:#884EA0,color:#000
    classDef runtime fill:#BFDBFE,stroke:#1D4ED8,color:#000
    classDef content fill:#BBF7D0,stroke:#15803D,color:#000
    classDef util fill:#FDE68A,stroke:#D97706,color:#000
```
