How atharvvvg/llmrepo works
Project type and purpose
• Full‑stack web application.
• Purpose: Provide a chat‑style Q&A, summarization, and insights interface over GitHub repos by combining a React frontend, a FastAPI backend, Google’s Gemini LLM, and the GitHub API.
File structure
• Top level
• main.py (orchestrator script to launch both frontend and backend)
• requirements.txt / package-lock.json (dep lists)
• backend/ (FastAPI code)
• frontend/ (Vite + React code)
• backend/
• main.py – FastAPI app, endpoints for repo Q&A, summarization, etc.
• frontend/
• src/ – React components (App.jsx, pages, CodeViewer, RepoFileTree, etc.)
• public/, vite.config.js – dev server config
README for additional insights
• Core technologies: React.js frontend, Python FastAPI backend
• External dependencies: Gemini LLM API, GitHub API
• Environment variables: GEMINI_API_KEY, GITHUB_TOKEN
• Launch options: unified script vs. manual startup
Main components and interactions
a. Components
• User’s web browser (UI)
• React frontend (Vite dev server in dev, static files in prod)
• FastAPI backend (uvicorn)
• Gemini LLM service (external)
• GitHub REST API (external)
• Orchestrator (main.py at repo root)
b. Relationships & data flow
1. User issues query in React UI
2. UI → HTTP POST → FastAPI endpoint (e.g., /api/query)
3. FastAPI fetches code/metadata from GitHub API
4. FastAPI sends prompt and code context to Gemini API
5. Gemini returns analysis/answer
6. FastAPI returns JSON response to UI
7. UI displays result
c. Architectural patterns/design principles
• Separation of concerns: UI vs. API vs. external services
• Thin client (React) + RESTful backend (FastAPI)
• Environment-based configuration via .env
d. Key technologies
• React.js, Vite, JSX
• Python 3.10+, FastAPI, uvicorn
• Google Gemini API
• GitHub REST API