How anikaitar70/aidebug works
AI Debug RAG API accepts repository uploads, safely extracts and indexes source code, then answers code questions using session-scoped retrieval and Gemini. The graph follows the documented upload-to-answer workflow and includes indexing audits, project overviews, retrieval-only queries, and shared security/configuration. Edges reflect README statements or relationships named in the SOURCE INDEX; unsampled service internals are not inferred.
Main entry points: upload.py Upload endpoints · query.py Query and stats endpoints · main.py FastAPI application · retrieval_service.py Vector retrieval and ranking
Components 19
API and UI
- Static web UI
index.html - FastAPI application
main.py - Upload endpoints
app/api/upload.py - Query and stats endpoints
app/api/query.py - Request and response schemas
app/models/schemas.py
Repository indexing
- Safe ZIP extraction
app/utils/zip_handler.py - File handling
app/services/file_service.py - Path filtering
app/utils/path_filters.py - Code parsing and chunking
app/services/code_parser.py - Project overview
app/services/project_overview_service.py
Retrieval and answers
- Embedding service
app/services/embedding_service.py - Vector retrieval and ranking
app/services/retrieval_service.py - Query intent classification
app/services/query_classifier.py - Gemini response generation
app/services/llm_service.py
Session state
- Session store
app/services/session_store.py
Security and configuration
- Authentication and rate limiting
app/security.py - Application settings
app/utils/config.py
Other components
- Client
- Google Gemini
Connections 28
- Client → Static web UI: uses
README.md - Client → FastAPI application: calls API
README.md - Static web UI → FastAPI application: calls API
README.md - FastAPI application → Upload endpoints: registers routes
main.py - FastAPI application → Query and stats endpoints: registers routes
main.py - Upload endpoints → Request and response schemas: uses models
app/api/upload.py - Query and stats endpoints → Request and response schemas: uses models
app/api/query.py - Upload endpoints → Safe ZIP extraction: extracts archives
app/api/upload.py - Upload endpoints → File handling: handles files
app/api/upload.py - Upload endpoints → Code parsing and chunking: parses source
app/api/upload.py - Upload endpoints → Embedding service: embeds chunks
app/api/upload.py - Upload endpoints → Vector retrieval and ranking: stores chunks
app/api/upload.py - Upload endpoints → Session store: updates session
app/api/upload.py - Upload endpoints → Project overview: generates overview
app/api/upload.py - Safe ZIP extraction → Path filtering: filters paths
app/utils/zip_handler.py - Code parsing and chunking → Path filtering: filters paths
app/services/code_parser.py - Query and stats endpoints → Embedding service: embeds query
app/api/query.py - Query and stats endpoints → Vector retrieval and ranking: retrieves context
app/api/query.py - Query and stats endpoints → Query intent classification: classifies query
app/api/query.py - Query and stats endpoints → Gemini response generation: generates answer
app/api/query.py - Query and stats endpoints → Session store: resolves session
app/api/query.py - Vector retrieval and ranking → Query intent classification: uses intent
app/services/retrieval_service.py - Vector retrieval and ranking → Session store: reads session
app/services/retrieval_service.py - Gemini response generation → Google Gemini: generates response
app/services/llm_service.py - FastAPI application → Authentication and rate limiting: configures security
main.py - Authentication and rate limiting → Application settings: loads settings
app/security.py - Upload endpoints → Authentication and rate limiting: uses rate limits
app/api/upload.py - Query and stats endpoints → Authentication and rate limiting: uses rate limits
app/api/query.py