How nhahub/nha-4-156 works
Astrolabe lets users submit a GitHub repository, ingest it into a searchable index, then explore it through chat, insights, charts, and generated documentation. The graph includes the documented capability branches, OAuth/private-repository access, and persistent state. Source excerpts are partial, so unshown route internals and some frontend request wiring are omitted rather than inferred.
Main entry points: api.jsx API client · pipeline.py Ingestion coordinator · ingestion.py Ingestion endpoints · chatbot.py ReAct code assistant
Components 29
User interface
- Repository submission
frontend/src/App.jsx - Repository workspace
frontend/src/pages/RepoIllustrationPage.jsx - Chat interface
frontend/src/components/ChatWindow.jsx - API client
frontend/src/lib/api.jsx - Auth state
frontend/src/lib/auth.jsx
Identity and access
- GitHub OAuth
api/routes/auth.py - Repository authorization
api/auth.py - Token encryption
api/security.py
Repository ingestion
- Ingestion endpoints
api/routes/ingestion.py - Ingestion coordinator
ingestion/pipeline.py - Repository preparation
ingestion/preprocessor.py - File loading
ingestion/loader.py - Language-aware chunking
ingestion/chunker.py - Embedding providers
embeddings/provider.py
Code exploration
- Chat endpoints
api/routes/chat.py - ReAct code assistant
llm/chatbot.py - Repository tools
rag/agent_tools.py - Result reranker
rag/reranker.py - Insight endpoints
api/routes/insight.py - Insight agent
rag/insight_generator.py - Charts endpoints
api/routes/charts.py - Chart analytics
insights/visualizer.py - Documentation endpoints
api/routes/docs.py - Documentation generator
insights/document_generator.py
Persistent state
- Vector index store
vectorstore/chroma_store.py - SQLite application data
api/database.py
Other components
- Repository explorer
- GitHub
- Cloud LLM providers
Connections 38
- Repository explorer → Repository submission: submits repository
frontend/src/App.jsx - Repository submission → API client: starts ingestion
frontend/src/App.jsx - Repository submission → API client: polls status
frontend/src/App.jsx - Repository explorer → Auth state: signs in
frontend/src/lib/auth.jsx - Auth state → GitHub OAuth: requests OAuth
frontend/src/lib/auth.jsx - GitHub OAuth → GitHub: exchanges code
- GitHub OAuth → SQLite application data: persists user
api/routes/auth.py - Repository authorization → SQLite application data: checks grants
api/auth.py - Repository authorization → GitHub: probes access
api/auth.py - SQLite application data → Token encryption: stores encrypted token
api/auth.py - API client → Ingestion endpoints: HTTP requests
frontend/src/lib/api.jsx - Ingestion endpoints → Repository authorization: checks repository access
api/routes/ingestion.py - Ingestion endpoints → Ingestion coordinator: runs ingestion
api/routes/ingestion.py - Ingestion endpoints → SQLite application data: records status
api/routes/ingestion.py - Ingestion coordinator → Repository preparation: prepares repository
ingestion/pipeline.py - Ingestion coordinator → File loading: loads files
ingestion/pipeline.py - Ingestion coordinator → Language-aware chunking: chunks documents
ingestion/pipeline.py - Ingestion coordinator → Embedding providers: configures embeddings
ingestion/pipeline.py - Ingestion coordinator → Vector index store: inserts vectors
ingestion/pipeline.py - Repository preparation → GitHub: clones repository
ingestion/preprocessor.py - API client → Repository workspace: loads workspace data
frontend/src/pages/RepoIllustrationPage.jsx - Repository workspace → Chat interface: renders chat
frontend/src/pages/RepoIllustrationPage.jsx - API client → Chat endpoints: HTTP requests
README.md - Chat endpoints → ReAct code assistant: runs chat
api/routes/chat.py - ReAct code assistant → Repository tools: uses exploration tools
llm/chatbot.py - ReAct code assistant → Result reranker: loads reranker
llm/chatbot.py - ReAct code assistant → Vector index store: queries index
- ReAct code assistant → Cloud LLM providers: requests completions
- API client → Insight endpoints: HTTP requests
README.md - Insight endpoints → Insight agent: generates insights
api/routes/insight.py - Insight agent → Cloud LLM providers: requests completions
- API client → Charts endpoints: HTTP requests
README.md - Charts endpoints → Chart analytics: builds charts
api/routes/charts.py - Charts endpoints → SQLite application data: reads chart cache
api/routes/charts.py - API client → Documentation endpoints: HTTP requests
README.md - Documentation endpoints → Documentation generator: generates documentation
api/routes/docs.py - Documentation generator → Cloud LLM providers: requests completions
- Ingestion endpoints → Repository authorization: grants repository access
api/routes/ingestion.py