Vedanshipanda/layer10-api
0
๐ง Layer10 Memory Graph
An organizational knowledge graph built from GitHub issues using LLMs โ visualized as an interactive force-directed graph.
๐ Project Structure
layer10-memory-graph/
โโโ Dockerfile # Backend container for Hugging Face
โโโ README.md # This file
โโโ requirements.txt # Python dependencies
โโโ src/
โ โโโ main.py # FastAPI backend
โ โโโ graph.py # Graph building logic
โ โโโ extraction.py # LLM entity extraction
โ โโโ ingestion.py # Data ingestion
โโโ data/
โ โโโ memory_graph.json # Knowledge graph (139 nodes, 81 edges)
โโโ ui/ # React frontend
โโโ src/
โ โโโ App.js
โ โโโ App.css
โโโ package.json๐ง Backend โ FastAPI
Endpoints
Stack
- FastAPI โ REST API
- NetworkX โ graph data structure
- Uvicorn โ ASGI server
- Docker โ containerized deployment
Local Development
# Create virtual environment
python -m venv venv
venv\Scripts\activate # Windows
source venv/bin/activate # Mac/Linux
# Install dependencies
pip install -r requirements.txt
# Run server
uvicorn src.main:app --reload --port 8000API docs at http://localhost:8000/docs
Deployment โ Hugging Face Spaces (Docker)
- Go to huggingface.co โ New Space
- Name:
layer10-apiยท SDK: Docker - Push repo with
Dockerfile,src/,data/,README.md - Space auto-builds and runs on port 7860
Live at: https://Vedanshipanda-layer10-api.hf.space
๐ฅ๏ธ Frontend โ React
Features
- Knowledge Graph โ interactive force-directed graph with glowing nodes and animated edges
- Filters โ filter by entity type, relationship type, min degree, max nodes
- Analytics โ type distribution charts, top relationship types, most connected nodes table
- Node Explorer โ inspect any node's incoming and outgoing relationships
- Query โ search the graph via backend API and highlight matching nodes
Stack
- React โ frontend framework
- react-force-graph-2d โ WebGL graph rendering
- Axios โ API calls
- Orbitron + Share Tech Mono โ robotic HUD-style fonts
Local Development
cd ui
npm install
npm startMake sure the backend is running at http://localhost:8000 first.
Deployment โ Hugging Face Spaces (Static)
- Go to huggingface.co โ New Space
- Name:
layer10-uiยท SDK: Static - Build the frontend:
cd ui
npm run build- Upload everything inside
ui/build/to the Space
Live at: https://Vedanshipanda-layer10-ui.hf.space
๐ Full Stack Setup
๐ Graph Stats
- 139 nodes โ Bugs, Developers, Features, Issues, Repositories, Technologies
- 81 edges โ relationships extracted from GitHub issues via LLM
- 6 entity types โ color-coded with neon glow in the visualization
