Book402 includes an interactive 3D book similarity graph built with Three.js.

Access

Open book402.com/graph to explore the graph.

Features

  • 3D visualization of 3,807 books as nodes in space
  • Similarity edges connecting related books
  • Search — find and highlight specific books
  • Click on a node to see book details in the sidebar
  • Adjustable threshold — control minimum similarity for edge display
  • Zoom, pan, rotate — full 3D navigation

How Similarity Works

graph TD A[Book A] -->|"vector embedding"| E1[768-dim vector] B[Book B] -->|"vector embedding"| E2[768-dim vector] E1 --> COS[Cosine Similarity] E2 --> COS COS -->|"> 0.25"| EDGE[Draw edge between A and B] COS -->|"< 0.25"| NONE[No connection]

Each book has a vector embedding (768 dimensions) computed from its content. Books with high cosine similarity are connected by edges in the graph.

Graph Data API

The graph is powered by two free API endpoints:

Get Graph Data

GET /graph/data?min_similarity=0.25

Returns all nodes (books) and edges (similarity connections) above the threshold.

Get Book Neighbors

GET /graph/book/:id

Returns the nearest neighbors for a specific book.

Embedding the Graph

You can embed the graph in your own page:

<iframe 
  src="https://book402.com/graph" 
  width="100%" 
  height="600" 
  frameborder="0"
  style="border-radius: 12px;"
></iframe>