Skip to content
プロジェクト

概要

A living, open-source knowledge graph of the Sacred Texts that grows with every text you add. Nine so far: the Vedas, Upaniṣads, Bhagavad Gītā, Mahābhārata, Rāmāyaṇa, Kashmir Śaivism, Aṣṭāvakra Gītā, Devī Māhātmya and Yoga Sūtras. Every connection cites its Sanskrit verse. Explore it in 3D, add the next text, or connect your AI through MCP.

データ・分析

この数値の測り方

計測したスター増加

24時間
履歴を収集中
7日間
履歴を収集中
15日間
履歴を収集中
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

Viśvarūpa emblem

Viśvarūpa · विश्वरूप

The cosmic form of Indian knowledge

A living, open-source knowledge graph of the Sacred Texts that grows with every text you add.
Nine so far, and every connection names the Sanskrit verse it stands on.

Live site MCP server Code licence: MIT Data licence: CC BY 4.0 PRs welcome
Python 3.12 Node 20+ React 19 TypeScript three.js

Open the live site →

Try it · User guide · Connect your AI · Add a scripture · Developer setup · Architecture


The Viśvarūpa home page: Bhagavad Gītā 11.13 in Devanāgarī, IAST and Ganguli's English, above live counts of verses, entities and cited connections

[!TIP] Nothing to install. Open https://visvarupa.vercel.app to explore, or give your AI the whole canon in one line: claude mcp add --transport http visvarupa https://visvarupa.vercel.app/api/mcp

Contents

At a glance

Viśvarūpa brings nine Sacred Texts into one federated graph so far: the Vedic Saṃhitās, the Principal Upaniṣads, the Bhagavad Gītā, the Mahābhārata, the Vālmīki Rāmāyaṇa, Kashmir Śaivism (Trika), the Aṣṭāvakra Gītā, the Devī Māhātmya and Patañjali's Yoga Sūtras.

The canon is not closed. It grows with every text contributors add: each new text arrives as its own pack, joins the shared hubs, and appears across the site (shelf, atlas, 3D Cosmos, counts) without a line of web code. See Open Renaissance to add the next one.

Read any verse and see who speaks it, to whom, and every figure and idea it names. Trace a curse, boon or vow across hundreds of chapters. Find the same idea, such as Māyā, Śakti, Prāṇa or Samādhi, across every tradition at once.

What sets it apart is provenance. Every edge names at least one verse address, such as mbh:5.188.2; click it to read the verbatim Sanskrit behind the claim. Eleven automated gates (G0–G10) reject anything that cannot be traced to its source: invented loci, paraphrased "quotes" and unlicensed text never ship.

Sacred Texts Verses indexed Entities Cited connections Cross-text hubs Textual links Karma chains
9 138,214 5,544 171,627 361 1,197 280

From the compiled site index (uv run visvarupa compile); per-pack counts from uv run visvarupa stats packs. The live MCP server reports the same figures at GET /api/mcp. Textual links are 1,127 verbatim verse parallels, 47 curated doctrinal resonances and the retellings and commentaries between texts.

Try it in your browser

I want to… Open
See the whole canon at once, in 3D /cosmos
Read a verse in Devanāgarī, IAST and English, with its parallels Bhagavad Gītā 2.47
Explore every figure of an epic as a graph Mahābhārata study graph
Follow one idea through every text that names it Māyā across eight texts
Find the verse-cited thread between two figures Abhinavagupta → Hanumān
Trace a curse, boon or vow hop by hop Mahābhārata karma chains
Compare the two epics as networks /compare
Help add the next scripture /renaissance

Features

3D Cosmos: the whole canon at once

Every Sacred Text is a galaxy around a golden core of the ideas, figures and places they share. Gold arcs carry each entity to its hub, ribbons join texts that retell one another, and ivory arches mark curated doctrinal resonances. Orbit, zoom, fly to a single text, or tap any star to study it.

The 3D Cosmos: nine coloured galaxies, one per Sacred Text, around a golden core of shared hubs

Study graph: every entity of a text, every edge cited

Each text has an interactive 2D graph of all its entities, laid out once at compile time. Filter by layer (causal, structural, co-cited) or kind (person, event, vow, curse, boon…). Select a figure to see its connections, its first citation, the karma chains through it, and its verified identities in other Sacred Texts.

The Mahābhārata study graph centred on Bhīṣma, with the inspector showing his verified identity in the Bhagavad Gītā and his cited edges

On a phone the graph becomes a full-screen-capable stage with one floating toolbar, collision-free landmark labels that multiply as you pinch in, a bottom-sheet inspector that appears only when you tap a node, and a ranked, filterable List view.

The study graph on a phone: landmark labels, a tapped node opening the inspector sheet, the ranked list view, and full screen

Verse reader: Sanskrit first, provenance always

Devanāgarī and IAST come from fetched sources, never retyped, with speaker frames ("who speaks to whom") and every entity and edge each verse carries. Across the canon shows where a verse sits inside other texts: Bhagavad Gītā 2.47 is Mahābhārata 6.24.47, and Gītā chapter 2 shares verses with the Kaṭha Upaniṣad.

The verse reader on Bhagavad Gītā 2.47: Devanāgarī, IAST, tagged concepts, and parallels in the Mahābhārata and the Kaṭha Upaniṣad

Sūtra Path and Concept Evolution

Sūtra Path from Abhinavagupta to Hanumān: eight hops across three Sacred Texts, each through a shared hub, a doctrinal reading or a causal edge with its verse

Sūtra Path (/paths): the shortest verse-cited thread between any two figures, places or concepts across all nine texts, hop by hop: shared hub, verse parallel, doctrinal resonance, causal or structural edge. Fly the path through the 3D Cosmos, or save it as a share card.

Concept Evolution for Māyā: one column per Sacred Text in canonical order, each with its anchoring verse in Devanāgarī, IAST and English

Concept Evolution (/concepts/maya): one concept across every Sacred Text that attests it, in canonical sequence. Each column carries its anchoring verse, its local ties and the curated doctrinal resonances that join the columns.

Karma chains, cross-text hubs, the Comparator and Open Renaissance

Karma Chain tracer: Bhīṣma's rejection of Ambā through to the death of Śikhaṇḍin, six hops, each citing a verse

Karma chains: 280 chains of curses, boons, vows and dharma conflicts, traced from cause to consequence. Each hop cites a verse and quotes the Sanskrit; explicit and implied causation are marked apart.

The canon map with the Māyā hub selected, linking a verse in each of the eight Sacred Texts that name it

Cross-text hubs: 361 shared ideas, figures and places, from Ātman and Dharma to Gaṅgā and Kurukṣetra, each linked to the exact verse in each text. Identities across texts stay in review until they are verified.

The Comparator: Maryādā (Rāmāyaṇa) and Dharma-saṅkaṭa (Mahābhārata), with network metrics computed from both epics

The Comparator: the two epics side by side as networks. Maryādā (the ordered ideal) meets dharma-saṅkaṭa (dharma under strain), with centralisation, density and modularity computed from the graph, not asserted.

The Open Renaissance page: live coverage of the three layers and the contributor studio

Open Renaissance: live coverage of the canon's three layers and a contributor studio. Pick a scripture and your AI coding tool, then copy a ready-made prompt that adds it to the graph.

Built for every screen

Responsive from 360 px phones to wide desktops: a single-row header with a menu sheet on phones, ink (dark) and parchment (light) themes, ⌘K search across entities, texts and pages, and safe-area-aware full-height stages.

Viśvarūpa on a phone: the home page, the menu sheet, the 3D Cosmos and the verse reader

Also included

  • Scholar (optional): a reading companion that runs on your own Groq or OpenRouter key, kept in your browser only. See Scholar.
  • Connect your AI: a remote, keyless, read-only MCP server with six grounded tools, plus /llms.txt for language models.
  • Share cards: every verse, karma chain, concept and path exports a copperplate bookplate PNG, and every deep link unfurls with its own Open Graph card (/api/og).
  • Doctrinal resonances: curated verse ↔ verse readings that join the Aṣṭāvakra Gītā, Devī Māhātmya and Yoga Sūtras to the canon, tagged apart from verbatim parallels; every probe word is checked against the committed Sanskrit.
  • Integrity by design: page titles for every view, a real 404 page with "perhaps you meant" suggestions, an opening screen so a reload never shows a half-built page, and automatic recovery when a new deployment replaces an open tab's files.
  • Fast by construction: a static SPA with content-hashed, budget-checked data shards. Layouts are computed at compile time, the browser never runs a force simulation, and three.js loads only when you open the 3D Cosmos.

User guide

Getting around

  • Header. On desktop: Viśvarūpa (home), 3D Cosmos, Sacred Texts, Sūtra Path, Open Renaissance and About, plus Search, Scholar, MCP and the theme switch. On a phone, the links, Scholar and MCP live behind the ☰ menu.
  • Search (Ctrl/⌘ K): find any entity, text or page. Typing without diacritics works: krishna finds Kṛṣṇa, sakti finds Śakti.
  • Theme: ☾ ink or ☼ parchment, remembered per browser. The cosmic stages (home hero, 3D Cosmos, graph canvas) stay dark in both.
  • Every view is a link. Selections, tabs, verses and paths live in the URL, so you can bookmark or share exactly what you see. Each share button copies the canonical link.

The 3D Cosmos

To… Do this
Orbit / zoom / pan Drag · scroll or pinch · right-drag or two fingers
Fly to one Sacred Text Pick it in the galaxy bar at the top (or tap its title in the sky)
Reframe the view Fit
Study a star or hub Click or tap it: the inspector opens with its profile, first verse and links
Filter kinds and layers View (desktop) or Filters (phone)
Watch it turn / hear it Auto-Orbit · ♪ Drone (a tanpura drone synthesised in your browser, off by default)
Clear the selection Esc

A Sacred Text's study graph

Open any text from Sacred Texts; its workspace has tabs for the 2D graph, the text inside the 3D Cosmos, Books & Shelf, and (for the two epics) Karma Chains.

To… Desktop Phone / tablet
Find an entity Search box, Enter flies to the first match Search in the top bar
Filter kinds, layers, colour Panels on the canvas (shift-click a kind to show it alone) Filters opens a sheet
Zoom / fit Scroll, + −, 0 · zoom buttons Pinch · Fit
Full screen ⛶ next to search ⛶, then ✕ Exit
Inspect an entity Click a node: the inspector docks on the right Tap a node: the inspector rises from the bottom
Browse as a list — Graph | List toggle at the foot of the stage

Reading verses

  • Layers: toggle Devanāgarī · IAST · English at the top of a chapter; your choice is remembered.
  • Speakers and frames: who speaks to whom, in nested narration. On phones open Speakers (N).
  • Across the canon: parallels and textual bridges to other Sacred Texts. On phones open Cross-Text Links (N).
  • A cited verse (?v= in the link) opens with its own card: position, frame, every entity it is linked to, the karma chains through it, and the English.
  • Share: Save Card exports a bookplate PNG; Copy Link copies the verse's canonical URL.
  • English comes from Indian public-domain translators. Where none aligns verse by verse, a clearly labelled Study rendering · Viśvarūpa is shown (see Principles).

Following ideas across texts

  • The atlas (home page): hubs on concentric rings between the nine text plates. Hover or tap a hub to trace it. On phones it becomes a hub explorer: tap an idea to see every text it joins, each a tap from its verse.
  • Concept Evolution (/concepts/<hub>): one concept, column by column, in canonical order.
  • Sūtra Path (/paths): type two ends or start from a preset; every hop names its verse.
  • Karma chains: inside the Mahābhārata and Rāmāyaṇa workspaces (tab Karma Chains).
  • The Comparator (/compare): the two epics measured as networks.

Scholar (bring your own key)

The Scholar answers questions from a compact, verse-cited subgraph retrieved in your browser, and every answer cites the verses it rests on.

  1. Open Scholar in the header (or the ☰ menu on a phone).
  2. Paste a free Groq or OpenRouter key and press Save.
  3. Ask, for example: "How is ātman described across the Gītā, the Upaniṣads and the Vedas?"
Provider Default model Notes
Groq openai/gpt-oss-120b Groq retired llama-3.3-70b-versatile on 16 August 2026
OpenRouter meta-llama/llama-3.3-70b-instruct Free models end in :free

If a provider retires a model, the Scholar lists the models your key can use, switches to the best current one, answers, and tells you. The model field suggests what your key can use.

[!IMPORTANT] Your key is stored only in your browser's localStorage and is sent only from your browser to the provider you chose. Nothing is proxied, logged or stored on a Viśvarūpa server, and the Scholar never writes to the graph.

Keyboard shortcuts

Keys Where Action
Ctrl/⌘ K Anywhere Open search
Esc Anywhere Close search, drawer, menu or modal; clear a selection; leave graph full screen
+ − 0 · arrows 2D graph (focused) Zoom in / out / fit · pan
Enter Graph search Fly to the first match
← → About page lightbox Previous / next picture

Link anatomy

Path Opens
/ · /?hub=<hub id> Home and the atlas (optionally with a hub selected)
/cosmos[/<slug>][?focus=<id>][&path=<from>|<to>] The 3D Cosmos, a galaxy, a selected star, a flown Sūtra Path
/explore The shelf of Sacred Texts
/explore/<slug>[?tab=3d|shelf|chains][&sel=<entity id>] A text's workspace (2D graph by default)
/explore/<slug>/read/<unit>?v=<locus> The reader, at one verse
/explore/<slug>/focus/<entity id> · /explore/<slug>/book/<n> An entity's lineage board · a book
/paths?from=<id>&to=<id> · /concepts/<hub> Sūtra Path · Concept Evolution
/compare · /renaissance · /about Comparator · Open Renaissance · About

Pack slugs: mahabharata, ramayana, vedas, bhagavad-gita, upanishads, kashmiri-shaivism, ashtavakra-gita, devi-mahatmya, yoga-sutras. Loci are <corpus>:<path>, always ending in a verse number: mbh:6.24.47, vr:2.64.53, bg:2.47, rv:1.164.20, up:katha.1.2.19, ks:ss.1.1. Any other path opens the 404 page, with the nearest real pages.

Connect your AI (MCP server)

Viśvarūpa runs a public Model Context Protocol server, so Claude, Cursor, Codex and other assistants can search and cite the canon themselves. Every answer is structured JSON with exact verse loci and canonical links, so your AI cites the verse instead of inventing it.

The Connect Viśvarūpa to your AI modal: the endpoint, per-client setup tabs and the six grounded tools with prompts to try
Endpoint https://visvarupa.vercel.app/api/mcp
Transport Stateless Streamable HTTP · JSON-RPC 2.0 · MCP protocol versions 2024-11-05 to 2025-11-25
Auth None. No key, no sign-up, read-only
Health GET /api/mcp returns the server info, protocol versions, tool list and live canon counts

The MCP button on the site opens the same setup with copy buttons and a live test call.

Set it up in your client

Claude Code: run once in a terminal, then check with /mcp inside Claude Code.

claude mcp add --transport http visvarupa https://visvarupa.vercel.app/api/mcp
Cursor · .cursor/mcp.json (one project) or ~/.cursor/mcp.json (every project)
{
  "mcpServers": {
    "visvarupa": { "url": "https://visvarupa.vercel.app/api/mcp" }
  }
}
Windsurf · ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "visvarupa": { "serverUrl": "https://visvarupa.vercel.app/api/mcp" }
  }
}
Claude Desktop · Settings → Developer → Edit Config (claude_desktop_config.json)

Bridged through mcp-remote:

{
  "mcpServers": {
    "visvarupa": { "command": "npx", "args": ["-y", "mcp-remote", "https://visvarupa.vercel.app/api/mcp"] }
  }
}

Or use Settings → Connectors → Add custom connector and paste the endpoint URL.

Codex · ~/.codex/config.toml
[mcp_servers.visvarupa]
url = "https://visvarupa.vercel.app/api/mcp"
OpenCode · opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "visvarupa": { "type": "remote", "url": "https://visvarupa.vercel.app/api/mcp", "enabled": true }
  }
}
Raw HTTP · any language, any client
# list the tools
curl -s https://visvarupa.vercel.app/api/mcp \
  -H 'content-type: application/json' \
  -H 'accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

# read one verse
curl -s https://visvarupa.vercel.app/api/mcp \
  -H 'content-type: application/json' \
  -H 'accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call",
       "params":{"name":"get_verse","arguments":{"locus":"bg:2.19"}}}'

The six tools

Tool Arguments What it returns Try asking
search_canon query, text?, kind?, limit? Diacritic-free search across all nine texts: entities, hubs, episodes, karma chains "Find every figure named Janaka across the Sacred Texts, and say which are the same person."
get_verse locus Sanskrit (where redistributable), public-domain English, speaker and frame, linked entities, parallels, reader link "Read bg:2.19: the Sanskrit, the English, who speaks, and its Mahābhārata parallel."
get_entity_network entity_id, limit? A figure's verse-cited ties, first verse, cross-text hub and homonym notes "Who is Bhīṣma tied to, verse by verse? Is the Vedic Sītā the Rāmāyaṇa's Sītā?"
compare_concept concept One concept across every text that attests it, every verse cited "Compare how Māyā is treated across the Upaniṣads, the Gītā, the Devī Māhātmya and Kashmir Śaivism."
trace_karma_chain query_or_id A curse, boon or vow traced hop by hop, each hop on its verse "Trace the curses on Karṇa hop by hop, quoting the verse of each hop."
find_sutra_path from, to The shortest verse-cited thread between two figures or concepts "Find the verse-cited thread from Bhīṣma to Naciketas and explain every hop."

[!NOTE] Name Viśvarūpa in your prompt ("… with Viśvarūpa") so your assistant reaches for the tools. For language models without MCP, /llms.txt summarises the canon and its conventions, and /data/api-index.json is the machine-readable index (CORS open).

Open Renaissance: add to the canon

The canon is meant to grow, and the Open Renaissance page is the door. It shows live coverage of the three layers (verse spine, entities and hubs, deep causal reading) and a contributor studio with two paths:

  • Add a new scripture: pick one of the suggested texts (Brahma Sūtras, Bhāgavata Purāṇa, Śiva Purāṇa, Kauṭilya's Arthaśāstra, Tirukkuṟaḷ, Sāraḷā Dāsa's Odia Mahābhārata, Caraka Saṃhitā, Nāṭyaśāstra, Harivaṃśa, Nārada Bhakti Sūtras) or name your own.
  • Deepen an epic chapter: claim one Mahābhārata adhyāya or Rāmāyaṇa sarga and have your agent read it closely.

Choose your AI coding tool (Claude Code, Cursor, Codex or OpenCode) and the studio writes the exact prompt and the commands to run. Your own agent does the work on your machine: there is no API bill, and the source text never leaves your computer.

How a scripture gets added

The last three texts of the canon (the Aṣṭāvakra Gītā, the Devī Māhātmya and the Yoga Sūtras) were added exactly this way. Open the repository in your coding agent and say:

Use skills/add-sacred-text/SKILL.md to add [Text Name] to Viśvarūpa, bridge it into the existing Sacred Texts, validate all gates, and verify it in the browser.

The skill walks your agent through six steps:

Step What happens Command
1 · Source Find an authentic Sanskrit (or Tamil, Odia…) edition with a clear licence, pin its revision, check the verse count —
2 · Ingest Scaffold the pack, build the verse spine from the source's own numbering, record licence and sha256, tag speakers and the figures and ideas it shares with the canon uv run visvarupa new-text <slug> --id <id> --title "<Title>" --from-text <file|url> …
3 · Bridge Join the shared hubs and validate every gate uv run visvarupa validate packs/<slug> --human · build-bridges · validate bridges
4 · Deepen Your agent reads the text chapter by chapter through a gated workqueue: every claim needs a verse and a verbatim quote uv run visvarupa queue build|claim|complete <slug> · promote <slug>
5 · Compile and look Build the web data within budgets and check the new galaxy, plate and reader in the browser uv run visvarupa compile · cd web; pnpm build; pnpm preview
6 · Pull request Gates pass (exit 0, or 2 with review items listed), sources carry licence + sha256 + redistribute, no hand-typed counts —

Nothing in web/ needs editing for a new text: the shelf, atlas, hero counts, 3D Cosmos galaxy and camera-bar button all appear from the data.

Deepen an epic chapter

Each batch is one Mahābhārata adhyāya or one Rāmāyaṇa sarga. This needs the source texts locally (see the note in Developer setup).

uv run visvarupa queue claim mahabharata --n 1 --agent <you> --priority causal   # 1. claim a batch
#    2. your agent reads ONLY that batch file and follows workqueue/EXTRACTION_SPEC.md
uv run visvarupa queue complete mahabharata <batch>                               # 3. the gate: schema, loci, verbatim quotes
uv run visvarupa promote mahabharata && uv run visvarupa build-bridges            # 4. publish into the pack

Claimable chapters are listed on the Bounty Board.

Developer setup

Prerequisites

Tool Version Used for
uv latest Installs Python 3.12 and the pipeline's dependencies
Node.js 20 or newer The web app and the serverless functions
pnpm 10 (pinned in web/package.json; corepack enable provides it) The web app's packages
Git any —

No Docker, database server or paid service is needed.

1 · Clone and install

macOS / Linux
git clone https://github.com/HimanshuMohanty-Git24/visvarupa.git
cd visvarupa
uv sync                      # Python 3.12 + dependencies
export PYTHONUTF8=1          # IAST needs UTF-8 everywhere
Windows (PowerShell)
winget install astral-sh.uv
git clone https://github.com/HimanshuMohanty-Git24/visvarupa.git
cd visvarupa
uv python install 3.12; uv sync
$env:PYTHONUTF8 = "1"        # in EVERY shell: cp1252 consoles crash on IAST

2 · Build the data

uv run visvarupa compile     # packs/ + bridges/ → web/public/data (budget-checked, about 4 minutes)

This reads only the committed graph. Run it again whenever packs/ or bridges/ change.

3 · Run the web app

cd web
pnpm install
pnpm dev                     # → http://localhost:5173 (also serves the api/ functions locally)
pnpm build && pnpm preview   # the production build → http://localhost:4173

4 · Run the checks

From the repository root:

uv run pytest -q                           # the pipeline's tests (no network)
uv run visvarupa validate packs bridges    # gates G0–G10: exit 0 clean · 2 review items only · 1 errors
npm ci && npm test                         # the api/ functions (MCP server, OG cards) against the compiled data
cd web && pnpm typecheck                   # the web app's types

[!NOTE] Everything above uses only the committed graph. The extraction workqueues also need the source texts: uv run visvarupa fetch downloads them into the git-ignored data/raw/, then stage, align, tag and queue build prepare the batches. See docs/DATA_ACQUISITION_PLAN.md.

Scripts

Where Command Does
web/ pnpm dev Vite dev server with the local api/ handlers
web/ pnpm typecheck · pnpm build · pnpm preview Type-check · production build to web/dist · serve it
web/ pnpm build:all visvarupa compile + pnpm build
root npm test node --test for the MCP server, OG cards and crawler tags
root uv run python pipeline/scripts/process_assets.py Source artwork (web/public/images/) → optimised WebP in web/public/assets/

Troubleshooting

Symptom Fix
UnicodeEncodeError: 'charmap' codec… on Windows Set PYTHONUTF8=1 in that shell. With python -I, use python -I -X utf8
The web app loads but shows no texts, or /data/… returns 404 Run uv run visvarupa compile first: web/public/data/ is generated, not committed
Port 5173 is already in use pnpm dev --port 5174 (or stop the other server)
pnpm complains about the lockfile or version corepack enable, then use the pnpm pinned in web/package.json
A gate fails after an edit uv run visvarupa validate packs/<slug> --human prints a readable report. Fix the data; never weaken a gate
The MCP live test fails locally Use pnpm dev or pnpm preview (both serve api/), and run npm ci at the repo root once

How it works

flowchart LR
    subgraph D["1 · Deterministic (0 LLM tokens)"]
        direction TB
        S["Sanskrit e-texts + public-domain English<br/>(local, git-ignored)"] --> F["fetch · stage<br/>DuckDB + verse spines"]
        F --> T["align · tag · expand<br/>speakers · aliases · mentions"]
        T --> B["build-bridges · find-parallels<br/>cross-text hubs"]
    end
    subgraph A["2 · Deep reading (in your agent)"]
        direction TB
        Q["queue claim<br/>one batch per chapter"] -- "your coding agent<br/>no API keys" --> X["queue complete<br/>schema · loci · verbatim quotes"]
        X --> P["promote<br/>into the pack"]
    end
    subgraph V["3 · Verify and ship"]
        direction TB
        K[("packs/ + bridges/<br/>JSONL in git")] --> G{"validate<br/>gates G0–G10"}
        G --> C["compile<br/>budgeted shards + layouts"]
        C --> W["web/<br/>static SPA + api/"]
    end
    D --> A --> V
  1. Deterministic layers (0 LLM tokens). Code builds the verse spines, speaker frames, alias registry, mentions, cross-edition alignments, verse parallels and cross-text hubs straight from the Sanskrit.
  2. Deep reading (in-agent). The causal layer of curses, boons, vows and conflicts is extracted one chapter at a time by a contributor's own coding agent, from a local batch file under workqueue/EXTRACTION_SPEC.md. queue complete checks every locus and quotation against the source before anything is accepted.
  3. Gates. validate runs eleven gates on every pack and exits non-zero on any error. Every pull request must pass.
  4. Compile. Packs and bridges become small, content-hashed JSON shards and precomputed layouts, within enforced size budgets: a static site any CDN can host.

Principles

Principle What it means in practice
Provenance or it doesn't ship Every stored edge names ≥ 1 verse in the corpus spine (gate G5). Quotes are verbatim (G6). Loci are never invented or approximated.
Authentic Indian sources Sanskrit primary texts. Translations only from Indian public-domain translators: K. M. Ganguli, M. N. Dutt, Swami Vivekananda and Swami Swarupananda. Where none aligns verse by verse, a clearly labelled Study rendering · Viśvarūpa (CC BY 4.0, under review) is written from the committed Sanskrit through a gated workqueue; it never replaces a translator. Western translations are rejected by gate G10.
Never retype scripture Sanskrit, IAST and Devanāgarī come from fetched sources through deterministic transliteration.
Licences are data Every source records licence, sha256 and redistribute. Text that may not be redistributed is cited by address and short quotation only.
Deterministic first Code produces structure, speakers, mentions, alignments, parallels and hubs. A language model is used only through gated, resumable workqueues run inside a contributor's own coding agent. The pipeline has no API keys.
Ambiguity is never silently merged Shared names stay flagged ambiguous. Uncertain claims go to review, not into the graph as fact.

The data model

Each Sacred Text is a self-contained Tradition Pack in packs/<slug>/, and packs meet only through bridges/.

  • Entity ids are <pack>:<kind>/<slug>: mbh:person/bhishma, gita:concept/samadhi, canon:concept/maya (a cross-text hub).
  • Loci are <corpus>:<path> and always end in a verse number: bg:2.44, mbh:6.24.47, vr-ce:2.58.1.
  • Edges are one JSONL record per (s, p, t), each with its provenance. A real edge from the Gītā pack:
{"basis":"text","p":"MENTIONS_CONCEPT","props":{"layer":"curated"},
 "prov":[{"by":"curated:yoga-sutras-bridges","locus":"bg:2.44","quote":"samādhau"}],
 "s":"bg:2.44","status":"auto","t":"gita:concept/samadhi"}

Every JSONL file is sorted by id with sorted keys, so rebuilds are byte-identical and every change reviews line by line in git. Design rationale is in docs/ARCHITECTURE.md.

The Sacred Texts

Sacred Text Pack Verses Entities Cited edges Sanskrit source English
Mahābhārata mbh 73,816 1,750 68,344 BORI Critical Edition (local only; packs ship loci and short quotes) K. M. Ganguli, M. N. Dutt
Vālmīki Rāmāyaṇa ram 42,222 464 12,083 IIT Kanpur vulgate (local only); Baroda CE via the Digital Corpus of Sanskrit (CC BY 4.0, shipped for 18,715 verses) M. N. Dutt
Vedic Saṃhitās veda 18,366 1,833 80,923 Ṛgveda (Aufrecht), Atharvaveda (Śaunaka), Śukla Yajurveda (Mādhyandina), with the Anukramaṇīs; Devanāgarī from Sanskrit Wikisource (CC BY-SA 4.0, shipped for 16,973 verses) Study renderings for 452 key mantras; an Anukramaṇī line (seer · deity · metre) for the rest
Bhagavad Gītā gita 701 157 3,907 The Gita Initiative (Unlicense) Swami Swarupananda (1909), verse by verse; Ganguli at Mbh 6.23–40
Principal Upaniṣads upan 1,706 163 1,379 upanishads.org.in, Sanskrit Wikisource Study renderings (all 1,706 verses)
Kashmir Śaivism (Trika) trika 322 247 765 Śiva Sūtras, Spanda Kārikās, Pratyabhijñāhṛdayam, Vijñāna Bhairava, Bhairava Stava; Sanskrit Wikisource (CC BY-SA 4.0, shipped for 256 of 322) Study renderings (all 256 shipped verses)
Aṣṭāvakra Gītā ashta 298 220 1,538 Sanskrit Wikisource (CC BY-SA 4.0 transcription, shipped) Study renderings (all 298 verses)
Devī Māhātmya devi 588 408 1,892 Mārkaṇḍeya Purāṇa 81–93, Sanskrit Wikisource (shipped; Purāṇa verse numbering) Study renderings (all 588 verses)
Patañjali's Yoga Sūtras yoga 195 302 796 Sanskrit Wikisource (shipped) Swami Vivekananda, Rāja Yoga (1896); a study rendering for 4.16

Each pack's manifest.json → sources[] records the full licence, checksum and redistribution flag of every source.

The web app

web/ is a static single-page app (Vite, React 19, TypeScript). Each view is its own lazy chunk; data arrives as small content-hashed shards from web/public/data/, fetched per view and cached immutably. Layouts are computed at compile time (fullgraph.json for the 2D graphs, universe-3d.json for the Cosmos), so the browser never runs a force simulation, and three.js is reachable only through a dynamic import() from the 3D views.

Beside the static site, api/ holds three stateless Vercel functions that read the deployment's own compiled shards:

Route What it is
/api/mcp The MCP server (JSON-RPC over Streamable HTTP; GET for health)
/api/og Open Graph share cards rendered as PNG (resvg + HarfBuzz)
/api/meta Route-specific meta tags for link-preview crawlers
The eleven gates
Gate Checks
G0 Contract The manifest parses, the contract version is supported, and required files are present
G1 Schema Every node, edge, alias, segment and passage validates, with no unknown keys
G2 Identity Id and locus grammar, uniqueness, and namespaces
G3 Integrity No dangling endpoints, orphans, self-loops or duplicate (s, p, t)
G4 Ontology Kinds are known and (kind(s), p, kind(t)) is allowed
G5 Provenance Every edge cites ≥ 1 locus that exists in the spine
G6 Grounding Quotes match the source: exact, normalised, or fuzzy (fuzzy goes to review); anything else is rejected
G7 Aliases Aliases resolve, and ambiguous aliases are flagged and annotated
G8 Logic Functional and symmetric predicates hold, there are no causal cycles, and implied causation is never auto
G9 Budgets Every compiled file is within its size budget
G10 Sources Every source has a licence and checksum, nothing marked redistribute: false is committed, and the authenticity rule holds
CLI reference
Command Purpose
visvarupa validate packs [bridges] Run gates G0–G10 (--human for a readable report, --staged grounds quotes against DuckDB)
visvarupa stats packs Counts per pack (the only source for published numbers)
visvarupa compile Packs + bridges → web/public/data/ and web/public/llms.txt (budget-enforced)
visvarupa fetch · stage · align · tag Fetch sources (sha256-recorded), stage to DuckDB, align editions, tag speakers and mentions
visvarupa queue build|status|claim|complete <epic|pack> Resumable extraction workqueues (claim --priority causal, --book N, --ids a,b)
visvarupa promote · expand-itihasa Publish gated batches into packs; deterministic scale-up (0 LLM tokens)
visvarupa build-bridges · find-parallels Cross-text hubs and textual bridges; verse ↔ verse parallels from the Sanskrit
visvarupa new-text <slug> --from-text <file|url> Scaffold and ingest a new Sacred Text in one step (--refresh replays it)
visvarupa new-pack <slug> Scaffold an empty pack that validates from day one
visvarupa gloss build|status|claim|complete|promote <pack> Study-rendering workqueue (workqueue/GLOSS_SPEC.md)
visvarupa schemas Regenerate schemas/ from the contract

Run uv run visvarupa --help for the full list.

Repository layout

packs/<slug>/          one self-contained Tradition Pack per Sacred Text: manifest, ontology, verse spine,
                       nodes, edges, aliases (JSON/JSONL, reviewable line by line in git)
bridges/               alignment tables, cross-text hubs, textual bridges, verse parallels, doctrinal resonances
pipeline/visvarupa/    contract · ids · translit · gates · compile · adapters · itihāsa pipeline
pipeline/scripts/      asset processing (WebP), OG image
web/                   the static explorer (Vite + React + TypeScript; three.js loaded lazily)
api/                   serverless functions: MCP server, OG cards, crawler meta tags (+ node:test suite)
schemas/               JSON Schemas generated from the contract (never edited by hand)
skills/                agent skills, e.g. add-sacred-text
workqueue/             the extraction and gloss specs and schemas (batches themselves are git-ignored)
tests/                 the pipeline's pytest suite
docs/                  architecture, data acquisition plan, repo audit, bounty board, README images

Contributing

The graph grows through pull requests, and every contribution passes the same gates. Your own AI coding agent does the work: Claude Code, Cursor, Codex and OpenCode all work. There is no API bill, and the source text never leaves your machine.

Path Start here
Add a Sacred Text The Open Renaissance studio or the one-prompt skill
Deepen an epic chapter Deepen an epic chapter · the Bounty Board
Review and repair validate --human lists review items; each pack's TODO_REPAIR.json lists claims waiting for a verse
Improve the web app cd web && pnpm dev. Animate only transform, opacity and stroke-dashoffset; never add a force simulation
Report an error Open an issue with the verse address and what is wrong

Read CONTRIBUTING.md for the ground rules and the pull-request checklist, and CLAUDE.md (or AGENTS.md) for the binding guide for coding agents.

Deployment

The site is static, with three small stateless functions beside it. It needs no database, no paid service and no data/raw/.

  • Vercel (production). The project is connected to this GitHub repository: every push to main builds and deploys production at https://visvarupa.vercel.app. vercel.json sets the build command bash web/scripts/build.sh, the output directory web/dist, cache headers, the SPA rewrite for clean URLs and the api/ functions.
  • Vercel CLI. vercel deploy --prod from the repository root builds the working folder instead. .vercelignore keeps data/ (including the © BORI e-text), the workqueues, compiled artefacts and source artwork out of the upload.
  • Cloudflare Pages. Use the same build command with web/dist as the output directory. Clean URLs work through the SPA fallback; the api/ functions are Vercel-only.

web/scripts/build.sh compiles the committed packs, installs the pinned web dependencies and builds the app. Old #/… links redirect to their clean paths before the first paint.

Project status

Layer Status
1 · Canonical verse spine ✅ Complete for all nine texts
2 · Entities, mentions and cross-text atlas ✅ Complete: 361 multi-text hubs, 1,197 textual links
3 · Deep causal reading 🟡 Every book covered (18 of 18 parvans, 7 of 7 kāṇḍas). 99 of 2,691 epic chapters deep-read so far, and the rest are open to contributors. The Aṣṭāvakra Gītā, Devī Māhātmya and Yoga Sūtras are read completely: every verse is cited.

FAQ

Why only Indian public-domain translations?

The project's thesis is to read these texts in their own tradition's voice. English glosses come from K. M. Ganguli, M. N. Dutt, Swami Vivekananda and Swami Swarupananda; gate G10 rejects Western translations. Where no such translation aligns verse by verse, a study rendering is written from the committed Sanskrit, labelled as such and kept in review.

Is an AI writing the graph?

Structure, speakers, mentions, alignments, parallels and hubs are produced by deterministic code. Deep reading (curses, boons, vows, doctrine) is done by contributors' own coding agents through gated workqueues, and queue complete refuses any claim whose locus is outside the batch or whose quote is not verbatim Sanskrit. There are no API keys in the pipeline.

Is the BORI Critical Edition text in the repository?

No. The BORI e-text (© BORI) is used only locally, in the git-ignored data/raw/, for extraction and grounding. The repository and the site ship verse addresses and short quotations from it, never the text.

Can I use the data in my own project or research?

Yes. The graph data in packs/ and bridges/ is CC BY 4.0: credit Viśvarūpa and link back (see Citation). Each source text keeps its own licence, recorded in its pack's manifest.

Does the Scholar or the MCP server see my key or my questions?

The Scholar sends your question and a compact subgraph straight from your browser to the provider you chose; nothing passes through a Viśvarūpa server. The MCP server needs no key at all and is read-only.

I found a wrong connection. What do I do?

Open an issue with the verse address (for example mbh:5.188.2) and what is wrong, or fix the edge in the pack and open a pull request: the gates will check it.

Related projects

Viśvarūpa unifies a series of standalone Sacred Text graphs by the same author:

Project What it is
VedAnvaya Knowledge graph of the Vedic Saṃhitās
GitaViśva Verse-cited knowledge graph of the Bhagavad Gītā
Upasarathi The Principal Upaniṣads and AI alignment: śreyas vs. preyas
Trikakosh Kashmir Śaivism: the 36 tattvas, Spanda and the Śiva Sūtras
KumoKG Companion open-source workbench for extraction and provenance checking. Viśvarūpa's gates descend from its ideas. It has its own licence.

Citation

If you use Viśvarūpa in research or teaching, please cite it:

@software{visvarupa_2026,
  author  = {Mohanty, Himanshu and {The Viśvarūpa contributors}},
  title   = {Viśvarūpa: An Open, Verse-Cited Knowledge Graph of Classical Indian Texts},
  year    = {2026},
  version = {0.1.0},
  url     = {https://github.com/HimanshuMohanty-Git24/visvarupa}
}

License

  • Code: MIT.
  • Graph data in packs/ and bridges/: CC BY 4.0.
  • Source texts keep their own licences, recorded per source in each pack's manifest.json. The BORI Critical Edition e-text (© BORI) is used only locally for extraction and grounding; the repository ships verse addresses and short quotations from it, never the text.

Acknowledgements

This project stands on the work of the editors, translators and digitisers who made these texts available:

  • the Bhandarkar Oriental Research Institute (Mahābhārata Critical Edition);
  • Kisari Mohan Ganguli, Manmatha Nath Dutt, Swami Vivekananda and Swami Swarupananda, whose public-domain English translations are the project's glosses;
  • Oliver Hellwig's Digital Corpus of Sanskrit;
  • GRETIL;
  • The Gita Initiative;
  • the Brodbeck–Black CE ↔ Ganguli concordance;
  • IIT Kanpur's Vālmīki Rāmāyaṇa;
  • Sanskrit Wikisource;
  • upanishads.org.in;
  • the digitised Ṛgveda Sarvānukramaṇī.

Created by Himanshu Mohanty · himabuilds.in

सर्वं खल्विदं ब्रह्म

関連プロジェクトを探す

読み込み中…