How sultanshahdev/localcode-intelligence works
LocalCode Intelligence is a local-first code exploration and search application. A user prepares a local or GitHub repository, checks its supported-source coverage, then searches semantically or by exact text; results can be opened in a bounded source viewer. Semantic search prepares source regions, combines local embeddings with lexical retrieval, and assesses relevance before returning candidates. Separate capabilities provide symbol exploration, file navigation, and a repository map. The graph follows documented API routes and sampled calls; some server handlers and language-adapter internals were not fully shown.
Main entry points: server.ts HTTP server · source.ts Source discovery · search.ts Semantic search · App.tsx Web UI
Components 18
User interfaces
- Web UI
web/src/App.tsx - Web API client
web/src/api.ts - CLI
src/cli.ts
API orchestration
- HTTP server
src/server.ts - Search queue
src/search-execution.ts
Repository understanding
- Source discovery
src/source.ts - Language adapters
src/languages - Coverage status
src/status.ts - Symbol explorer
src/symbols.ts - Repository map
src/repository-map.ts
Search and ranking
- Exact text search
src/exact-search.ts - Semantic search
src/search.ts - Hybrid retrieval
src/retrieval.ts - Embedding cache
src/persistent-embedding-cache.ts - Relevance assessment
src/relevance.ts
Repository inputs
- Path validation
src/repository.ts - GitHub acquisition
src/github-repository.ts
Other components
- Engineer
Connections 27
- Engineer → Web UI: uses
README.md - Web UI → Web API client: requests
web/src/App.tsx - Web API client → HTTP server: calls API
README.md - Engineer → CLI: runs commands
README.md - CLI → Path validation: validates paths
src/cli.ts - CLI → Semantic search: runs search
src/cli.ts - HTTP server → Path validation: validates paths
src/server.ts - HTTP server → GitHub acquisition: acquires checkout
README.md - HTTP server → Coverage status: checks coverage
src/server.ts - HTTP server → Search queue: queues searches
src/server.ts - HTTP server → Semantic search: dispatches semantic
README.md - HTTP server → Exact text search: dispatches exact
src/server.ts - HTTP server → Symbol explorer: dispatches symbols
README.md - HTTP server → Repository map: builds map
README.md - HTTP server → Source discovery: reads source
README.md - Coverage status → Source discovery: inspects scope
src/status.ts - Source discovery → Language adapters: resolves adapters
src/source.ts - Repository map → Source discovery: uses exclusions
src/repository-map.ts - Semantic search → Source discovery: prepares scope
src/search.ts - Semantic search → Hybrid retrieval: retrieves candidates
src/search.ts - Semantic search → Embedding cache: creates embedder
src/search.ts - Semantic search → Relevance assessment: assesses candidates
src/search.ts - Hybrid retrieval → Source discovery: uses regions
src/retrieval.ts - Exact text search → Source discovery: scans source
src/exact-search.ts - Symbol explorer → Source discovery: discovers files
src/symbols.ts - Web UI → HTTP server: prepares repository
README.md - Web UI → HTTP server: opens source
web/src/App.tsx