How harshbarnwal0101/software-knowledge-graph works
Software Knowledge Graph ingests GitHub repositories into relational records, a Neo4j symbol/dependency graph, and Qdrant vectors, then exposes exploration, search, chat, history, impact, health, and patch capabilities through a web app. The documented main workflow is user → Next.js → FastAPI → repository analysis; sampled ingestion code confirms clone, parse, graph construction, and embedding stages. Some feature implementations are represented at their exact directories because their source was not excerpted; those links are documented or marked unverified rather than inferred from names alone.
Main entry points: repositories.py Repository routes · ingestion_service.py Ingestion orchestration · main.py FastAPI entry · impact_service.py Impact analysis
Components 22
Web application
- Next.js application
frontend/app - Repository views
frontend/app/repositories/[id] - API client
frontend/lib/api.js
API and identity
- FastAPI entry
backend/app/main.py - Authentication routes
backend/app/api/routes/auth.py - Repository routes
backend/app/api/routes/repositories.py - Auth dependencies
backend/app/api/deps.py
Repository analysis
- Ingestion orchestration
backend/app/services/ingestion_service.py - Git operations
backend/app/services/git_service.py - Language parsing
backend/app/parsers
Code intelligence
- Impact analysis
backend/app/services/impact_service.py - Codebase agent
backend/app/agents - Hybrid search
backend/app/retrieval/hybrid_search.py - Patch proposals
backend/app/services/patch_service.py - Git history
backend/app/services/git_service.py - Repository health
backend/app/services
Persistence and indexes
- Relational records
backend/app/core/database.py - Knowledge graph
backend/app/graph/neo4j_service.py - Vector index
backend/app/retrieval/vector_service.py - Embedding generation
backend/app/embeddings/embedding_service.py
Other components
- User
- LLM service
Connections 24
- User → Next.js application: uses
README.md - Next.js application → FastAPI entry: calls API
README.md - FastAPI entry → Authentication routes: registers routes
backend/app/main.py - FastAPI entry → Repository routes: registers routes
backend/app/main.py - Repository routes → Ingestion orchestration: starts analysis
backend/app/api/routes/repositories.py - Repository routes → Impact analysis: requests analysis
backend/app/api/routes/repositories.py - Repository routes → Codebase agent: requests answers
backend/app/api/routes/repositories.py - Repository routes → Hybrid search: requests search
backend/app/api/routes/repositories.py - Repository routes → Knowledge graph: requests graph
backend/app/api/routes/repositories.py - Repository routes → Patch proposals: requests patch
backend/app/api/routes/repositories.py - Authentication routes → Auth dependencies: uses identity
backend/app/api/routes/auth.py - Ingestion orchestration → Git operations: clones repository
backend/app/services/ingestion_service.py - Ingestion orchestration → Language parsing: parses files
backend/app/services/ingestion_service.py - Ingestion orchestration → Relational records: stores records
backend/app/services/ingestion_service.py - Ingestion orchestration → Knowledge graph: builds graph
backend/app/services/ingestion_service.py - Ingestion orchestration → Vector index: indexes chunks
backend/app/services/ingestion_service.py - Vector index → Embedding generation: embeds text
backend/app/retrieval/vector_service.py - Impact analysis → Knowledge graph: queries dependencies
backend/app/services/impact_service.py - Impact analysis → Relational records: reads symbols
backend/app/services/impact_service.py - Patch proposals → Git operations: reads checkout
backend/app/services/patch_service.py - Codebase agent → Hybrid search: retrieves context
- Codebase agent → LLM service: asks questions
- Hybrid search → Vector index: searches vectors
- Repository views → API client: uses client