How suso-van/contrib works
FirstPR is a GitHub repository mentor: a user loads a public repository, then asks about it or submits an issue for likely-file localization and an AI-generated explanation, optionally with a patch. The backend also exposes repository status and general repository Q&A. The excerpts show API orchestration, issue parsing, retrieval/reranking, and frontend response handling; details of unsampled service internals and some frontend requests remain uncertain.
Main entry points: api.py API routes · main.py API app · App.jsx App workflow · services.py Search and retrieval
Components 19
Web client
- App workflow
frontend/src/App.jsx - Repository chat
frontend/src/Chatbox.jsx
API and coordination
- API app
backend/main.py - API routes
backend/api.py - Request schemas
backend/schemas.py - Rate limiting
backend/limiter.py - Runtime settings
backend/config.py
Issue analysis
- Issue parsing
backend/issue_parser.py - Search and retrieval
backend/services.py - File reranking
backend/reranker.py - Answer and patch
backend/services.py
Repository intelligence
- Repository loading
backend/api.py - Indexed repo cache
backend/api.py - GitHub and code utilities
backend/utils.py
Model runtime
- Embedding service
backend/embed_server.py - Rerank service
backend/rerank_server.py
Other components
- Contributor
- GitHub
- LLM provider
Connections 20
- Contributor → App workflow: uses
frontend/src/App.jsx - App workflow → Repository chat: renders
frontend/src/App.jsx - API app → API routes: mounts routes
backend/main.py - API app → Rate limiting: configures
backend/main.py - API app → Runtime settings: loads settings
backend/main.py - API routes → Request schemas: uses
backend/api.py - API routes → GitHub and code utilities: uses
backend/api.py - API routes → Repository loading: handles load
backend/api.py - Repository loading → GitHub: clones repo
backend/api.py - Repository loading → Indexed repo cache: caches index
backend/api.py - API routes → Indexed repo cache: reads cache
backend/api.py - API routes → Issue parsing: extracts issue
backend/api.py - API routes → Search and retrieval: runs retrieval
backend/api.py - Search and retrieval → File reranking: reranks candidates
backend/services.py - API routes → Answer and patch: requests reasoning
backend/api.py - Answer and patch → LLM provider: generates answer
- Search and retrieval → Embedding service: embeds code
- File reranking → Rerank service: scores candidates
- API routes → GitHub: fetches issue
- App workflow → API routes: calls API