Interactive 3D knowledge graph explorer for literary analysis
Named after Jorge Luis Borges' "The Library of Babel" — a universe in the form of a vast library containing all possible books.
Borges Library lets you explore literary works through their knowledge graphs. Ask questions in natural language, and see how entities (people, places, concepts) connect across different books.
Key capabilities:
- Query multiple books simultaneously using natural language
- Visualize extracted entities as interactive 3D nodes
- Trace answers back to source text passages (end-to-end interpretability)
| Feature | Description |
|---|---|
| Multi-book querying | Ask questions across your entire library at once |
| 3D force-directed graph | Interactive visualization with color-coded entity types |
| End-to-end interpretability | Click any entity to see the source text that generated it |
| Mobile responsive | Works on desktop, tablet, and mobile devices |
| Category | Technologies |
|---|---|
| Framework | Next.js 16, React 19, TypeScript 5.2 |
| Visualization | 3d-force-graph, Three.js, D3.js |
| Styling | Tailwind CSS, Heroicons |
3_borges-interface/
├── src/
│ ├── app/ # Next.js App Router (pages + API routes)
│ ├── components/ # React components (graph, modals, query interface)
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Services and utilities
│ └── types/ # TypeScript definitions
| Component | Description |
|---|---|
BorgesLibrary.tsx |
Main application shell |
GraphVisualization3DForce.tsx |
3D graph rendering |
QueryInterface.tsx |
Natural language search |
ProvenancePanel.tsx |
Answer source tracing |
EntityDetailModal.tsx |
Entity details and connections |
TextChunkModal.tsx |
Source text viewer |
| Repository | Description |
|---|---|
| reconciliation-api | Backend API for graph queries, chunk retrieval, and GraphRAG search |
- Node.js 18+
- npm or yarn
cd 3_borges-interface
npm install
npm run devCreate 3_borges-interface/.env.local:
NEXT_PUBLIC_RECONCILIATION_API_URL=https://reconciliation-api-production.up.railway.appFor local development with the reconciliation API:
NEXT_PUBLIC_RECONCILIATION_API_URL=http://localhost:5002Deployed on Vercel with root directory set to 3_borges-interface/.
The frontend connects to the reconciliation API deployed on Railway.
- No orphaned nodes - All displayed entities must have relationships
- Books at center - Books are core entities, always central to queries
- Inter-book exploration - Connections between books are prioritized
- Visual clarity - Space between nodes to see relationships clearly
- Full interpretability - Navigate from text chunks to RAG answers through the graph
MIT
Built with GraphRAG | Inspired by Borges
