Skip to content

sdesaurabh/compilo

Repository files navigation

Compilo

Turn raw documents into a living, interlinked personal wiki — compiled and maintained by Claude AI.

Compilo = Compile + Wiki. You feed it raw sources. Claude does the rest.

Drop in a PDF, paper, URL, or DOCX → Claude reads it, writes a structured wiki article with a summary, tags, and [[backlinks]] to related articles — and keeps the whole knowledge base coherent over time.

Inspired by Andrej Karpathy's LLM Knowledge Base idea (April 2026). This is a full working implementation as a web app, not a script.

Built entirely on a phone using Claude Code. No laptop. No desktop.


Why Compilo

Most personal knowledge tools make you do the work. You highlight, tag, link, summarise. You build the graph. You maintain it.

Compilo flips this. You throw in sources. Claude compiles them — the same way a compiler turns source code into something structured and useful. The wiki grows, stays linked, and stays coherent. You just read and ask questions.

No RAG. No vector database. No embeddings. Just Claude writing and maintaining plain Markdown — exactly as Karpathy described.


What it does

Feature Description
Compile PDF / DOCX / TXT / URL → structured wiki article with summary, tags, [[backlinks]]
Wiki viewer Read articles with rendered backlinks, navigate by clicking links
Grounded Q&A Ask questions in plain English, get answers with source citations
Health check Claude audits for contradictions, missing concepts, unlinked pairs, coverage gaps
Search Full-text search across all articles
Graph view Interactive force-directed backlink graph, click nodes to navigate
Export Download as Obsidian vault (.zip) or single Markdown file
Multiple KBs Separate knowledge bases for different projects or topics
Schema editor Give Claude per-KB instructions: topic, style, citation format

You only need two things to run this

What Cost
Claude Code Free tier available
Replit or Railway Free tier available

No local setup required. No laptop required. Built and deployed entirely from a phone.


Deploy in 2 minutes

Railway (recommended — always-on free tier)

Deploy on Railway

  1. Go to railway.appNew ProjectDeploy from GitHub repo
  2. Select your fork of this repo
  3. Variables tab → add ANTHROPIC_API_KEY=sk-ant-...
  4. Railway builds and gives you a live HTTPS URL in ~2 minutes

The railway.toml in this repo handles everything automatically.

Replit (great for trying it out)

  1. Go to replit.comCreate ReplImport from GitHub
  2. Paste your fork URL
  3. Secrets (lock icon) → add ANTHROPIC_API_KEY=sk-ant-...
  4. Click Run

The .replit config in this repo handles the build and start automatically.

Local

git clone https://github.com/sdesaurabh/compilo
cd compilo
npm install
cp .env.example .env        # add your ANTHROPIC_API_KEY
npm run dev                 # backend :3001 + frontend :5173

Open http://localhost:5173.


How it works

You add a source (PDF / URL / DOCX / TXT)
        ↓
Claude reads it and writes a wiki article (.md)
  · YAML frontmatter: title, summary, tags, date
  · [[backlinks]] to related articles already in your wiki
  · Clean Markdown body
        ↓
Article saved locally (filesystem + SQLite metadata)
        ↓
Read · Search · Ask questions · Run health check · Export

Every article is a plain .md file. No lock-in. Works in Obsidian, VS Code, or any text editor. Export your entire wiki as an Obsidian vault any time.


Environment variables

Variable Required Default Description
ANTHROPIC_API_KEY Yes Get one at console.anthropic.com
PORT No 3001 Port the server listens on
DATA_DIR No ./data Where wiki files and the database are stored

Tech stack

Layer Tech
Backend Node.js, Express
AI Anthropic Claude API (claude-opus-4-6 for compilation, claude-sonnet-4-6 for Q&A)
Storage SQLite (metadata) + local filesystem (.md files)
Frontend React 19, Vite 5, Tailwind CSS
Graph force-graph (canvas)
Export archiver (zip)

Project structure

compilo/
  backend/
    server.js           ← Express entry point
    routes/             ← upload, compile, wiki, qa, search, graph, export, kb…
    services/
      claude.js         ← All Claude API calls
      db.js             ← SQLite queries
      wikiManager.js    ← Markdown I/O, backlink parsing
      fileParser.js     ← PDF / DOCX / TXT extraction
  frontend/
    src/
      App.jsx           ← Router + responsive nav
      api.js            ← KB-aware fetch wrapper
      pages/            ← Home, Wiki, Article, QA, Graph, Health, History, Settings
      components/       ← Uploader, URLIngestor, MarkdownViewer, KBSelector
  docs/
    ROADMAP.md          ← What's coming in v2
    ARCHITECTURE.md     ← Technical deep-dive

Roadmap

v2 is planned. See docs/ROADMAP.md for the full spec.

Top priorities for v2:

  • Semantic search via vector embeddings
  • GitHub repo ingestion
  • MCP server (query your wiki inside Claude Code)
  • Marp slide generation from articles
  • CLI (compilo add paper.pdf)

Contributing

Contributions are welcome. See CONTRIBUTING.md.

Good first issues are labeled good first issue.


License

MIT — see LICENSE.

About

Meet Compilo. Inspired by Andrej Karpathy's LLM Knowledge Base idea. This is a full working implementation as a web app built and deployed entirely using an iPhone, claude-code and railway.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages