# karpathy/scholaroctopus architecture

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

- Interactive diagram: https://gitdiagram.com/karpathy/scholaroctopus
- Repository: https://github.com/karpathy/scholaroctopus

## Overview

##### File structure
- Top level:
- README.md – project description, visualization goals, contribution hints
- render/ – contains all client artifacts
– data5.json – the precomputed 2D embedding and metadata for papers
– index.html – the main visualization page (HTML, CSS, JS all together)
- No backend folder, no build scripts, no tests; it’s purely a static site.

##### README for additional insights
- Primary visualization uses t-SNE and tf-idf to embed paper text.
- The “render/index.html” is the canonical view; contributions add new HTML views.
- No database or dynamic API—the data is baked into a JSON file.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Actors and runtime
    User(("User")):::actor
    Browser["Browser / Rendering Engine"]:::runtime

    %% External Libraries
    ExtLib["External Libraries (CDN)"]:::external

    %% Static Hosting Service and assets
    subgraph "Static Hosting Service"
        Docs["Project Documentation & Goals\n(README.md)"]:::staticAssets
        subgraph "Render Assets Directory\n(render/)"
            RenderView["HTML/JS Application\n(render/index.html)"]:::staticAssets
            DataFile["Data File\n(render/data5.json)"]:::staticAssets
        end
    end

    %% Data flow and interactions
    User -->|"interact (mouse/keyboard)"| Browser
    Browser -->|"GET /index.html"| Static_Hosting_Service
    Static_Hosting_Service -.->|serves index.html, CSS, JS| Browser
    Browser -->|"fetch via CDN"| ExtLib
    ExtLib -.->|serves JS/CSS libraries| Browser
    Browser -->|"GET /render/data5.json"| Static_Hosting_Service
    Static_Hosting_Service -.->|serves data5.json| Browser
    Browser -->|"render SVG/Canvas"| Browser

    %% Click events
    click User "https://github.com/karpathy/scholaroctopus/blob/master/."
    click Browser "https://github.com/karpathy/scholaroctopus/blob/master/."
    click ExtLib "https://github.com/karpathy/scholaroctopus/blob/master/render/index.html"
    click Static_Hosting_Service "https://github.com/karpathy/scholaroctopus/tree/master//"
    click Docs "https://github.com/karpathy/scholaroctopus/blob/master/README.md"
    click RenderView "https://github.com/karpathy/scholaroctopus/blob/master/render/index.html"
    click DataFile "https://github.com/karpathy/scholaroctopus/blob/master/render/data5.json"
    click RenderAssets "https://github.com/karpathy/scholaroctopus/tree/master/render/"

    %% Styles
    classDef actor fill:#FFD700,stroke:#333,stroke-width:1px
    classDef runtime fill:#ADFF2F,stroke:#333,stroke-width:1px
    classDef external fill:#87CEFA,stroke:#333,stroke-width:1px
    classDef staticAssets fill:#FFB6C1,stroke:#333,stroke-width:1px
```
