How rekib0023/racode-reviewer works
Project type and purpose
• This is a backend-only, microservice-style application (“RACode Reviewer”) that provides AI-powered, retrieval-augmented code reviews.
• It consumes GitHub webhook events, performs incremental code indexing and embedding, stores embeddings in a vector database (LanceDB), invokes an LLM for review generation, and posts review comments back to GitHub.
File structure
• Top-level files
• Dockerfile, pyproject.toml, requirements.txt, .env.example, README.md, TECHNICAL_DOCS.md
• app/main.py – FastAPI app entrypoint
• app/api
• routes/github.py – webhook endpoint
• routes/health.py – healthcheck
• dependencies.py – DI for settings, clients
• app/core
• config.py – Singleton settings loader
• exceptions.py – custom exception hierarchy
• logging_config.py – structured logging
• app/services
• github_service.py – wraps GitHub API calls
• llm_service.py – wraps calls to LLM (RAG retriever)
• app/indexing
• indexer.py, incremental_indexer.py – orchestration of file diff detection and re-indexing
• code_parser.py, embedding_generator.py – parsing source, factory for embedding models
• app/storage
• repo_manager.py – clones or opens local repo
• vector_store.py – LanceDB interactions (Repository pattern)
• app/llm
• rag_retriever.py – retrieves context vectors + prompt
• prompts.py – prompt templates
• app/utils – general parsers, diff utils
README insights
• Core components: GitHub API ↔ FastAPI App ↔ LLM Service; GitHub Service ↔ Incremental Indexer; Embedding Gen ↔ Vector Database
Detailed capture of essential elements
• Do not conflate embedding generation with vector store; show them as separate modules
• Configuration injection at the API layer (“core.config”)