Skip to content

MathNetwork/Astrolabe

Repository files navigation

Astrolabe

A web app for reading, visualizing, and interacting with content-addressed mathematical knowledge networks.

Paper License: AGPL-3.0


What is this?

The canonical Astrolabe frontend: a Next.js app (React frontend + Node /api Route Handlers, no separate backend) that serves the knowledge networks under ../projects/. Each project is a content-addressed store of mathematical statements, formal Lean declarations, and typed relations between them.

  • ReadView — render .astrolabe/docs/*.mdx with LaTeX, entry blocks, and cross-references
  • NetworkView — visualize the entry graph with d3-force simulation
  • DetailView — inspect entries with structured record rendering
  • Plugin system — extensible analysis and visualization (see src/plugins/leannets/)

The store

One .md file per node (YAML front-matter + body), named by its hash. Conceptually each entry is:

{ "<12-char-hash>": { "ref": ["<hash>", ...], "record": { ... } } }
  • ref — an ordered list of hashes. |ref| - 1 is the width of the entry: width 0 (ref = [self_hash]) is an atom, width 1 (ref = [A, B]) a binary relation, width k a higher-dimensional relation.
  • record — structured content (sort, source, title, statement text, Lean source, …), interpreted by plugins.
  • hash — content-address over the canonical record (JSON with sorted keys, ", " / ": " separators):
    • atom: SHA256("__self__" ‖ 0x00 ‖ canon(record))[:12 hex]
    • edge: SHA256(ref₁ ‖ 0x00 ‖ … ‖ refₖ ‖ 0x00 ‖ canon(record))[:12 hex]

Two layouts: a self-contained project keeps .astrolabe/{atoms,edges} of its own; a hypergraph-sharing project reads the shared pool <projectsRoot>/hypergraph/{atoms,edges} unioned with its optional .astrolabe/hypergraph/* layer (project layer wins). Read path: src/lib/server/store.ts; write path: src/lib/server/storeOps.ts. The full model is documented in CLAUDE.md and content/data-model.mdx.

Docs use \entryref{hash} and \entryblock{hash} macros in .mdx files to cross-reference and inline entries; $...$ LaTeX is rendered via KaTeX.

Develop

npm install
npm run dev        # http://localhost:3000

npx vitest run     # tests
npx tsc --noEmit   # typecheck

License

AGPL-3.0

About

A desktop reader for astrolabe.json — content-addressable knowledge networks with higher-dimensional semantic structures. Plugin-based analysis and visualization.

Topics

Resources

License

Stars

4 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages