How rejankarki1/repolens works
RepoLens turns a public GitHub repository into a browsable, searchable, question-answerable workspace with architecture views. Users sign in or browse an allow-listed showcase, import repositories, then explore source, ask citation-grounded questions, and inspect component diagrams. Ingestion and analysis run as background jobs; PostgreSQL stores shared repository snapshots and user data, while Redis supports jobs and limits. The README documents the main runtime integrations; sampled source and the source index support selected internal links. Several unsampled routes and jobs are represented at subsystem level.
Main entry points: client.ts Web API client · entities.py PostgreSQL + pgvector · main.py FastAPI application · ingestion.py Ingestion pipeline
Components 26
Workspace experience
- Repo workspace
apps/web/components/workspace - Code Explorer
apps/web/components/workspace/code-explorer.tsx - Ask AI
apps/web/components/workspace/chat/chat-panel.tsx - Architecture Explorer
apps/web/components/workspace/architecture/diagram-view.tsx - Web API client
apps/web/lib/api/client.ts
API and access
- FastAPI application
apps/api/main.py - Authentication and access
apps/api/core/auth.py - Repository and ingestion routes
apps/api/routes/ingestions.py - Search routes
apps/api/routes/search.py
Repository processing
- Ingestion pipeline
apps/api/services/ingestion.py - GitHub archive intake
apps/api/services/github_archive.py - Background jobs
apps/api/jobs/ingestion_job.py
Search and analysis
- Code parsing and indexing
apps/api/services/code_indexing.py - Source and chunk storage
apps/api/services/source_file_persistence.py - Hybrid code search
apps/api/services/code_search.py - Grounded answer generation
apps/api/services/rag.py - Architecture analysis
apps/api/services/architecture/build.py - Architecture diagrams
apps/api/services/architecture_diagram/context.py - Semantic embeddings
apps/api/services/embeddings.py
Runtime state
- RQ queue
apps/api/core/queue.py - PostgreSQL + pgvector
apps/api/models/entities.py - Redis
apps/api/core/redis.py
Other components
- Visitor / user
- GitHub
- Gemini
- Groq
Connections 26
- Visitor / user → Repo workspace: browses
README.md - Repo workspace → Web API client: requests data
README.md - Web API client → FastAPI application: calls API
README.md - FastAPI application → Authentication and access: resolves identity
apps/api/main.py - Repository and ingestion routes → RQ queue: enqueues ingestion
apps/api/routes/ingestions.py - Background jobs → Ingestion pipeline: runs pipeline
apps/api/jobs/ingestion_job.py - Ingestion pipeline → GitHub archive intake: downloads archive
apps/api/services/ingestion.py - GitHub archive intake → GitHub: fetches repository
README.md - Ingestion pipeline → Code parsing and indexing: indexes code
apps/api/services/ingestion.py - Ingestion pipeline → Source and chunk storage: persists snapshot
apps/api/services/ingestion.py - Source and chunk storage → PostgreSQL + pgvector: writes source
apps/api/services/source_file_persistence.py - Code Explorer → Web API client: loads files
README.md - Search routes → Hybrid code search: runs search
apps/api/routes/search.py - Hybrid code search → Semantic embeddings: embeds query
apps/api/services/rag.py - Hybrid code search → PostgreSQL + pgvector: retrieves chunks
README.md - Ask AI → Web API client: sends questions
README.md - Grounded answer generation → Hybrid code search: retrieves code
apps/api/services/rag.py - Grounded answer generation → Groq: generates answers
README.md - Semantic embeddings → Gemini: creates vectors
apps/api/services/embeddings.py - Architecture analysis → PostgreSQL + pgvector: stores analysis
apps/api/services/architecture/store.py - Architecture diagrams → Gemini: proposes diagram
README.md - Architecture Explorer → Web API client: loads diagrams
README.md - FastAPI application → PostgreSQL + pgvector: reads and writes
README.md - FastAPI application → Redis: uses limits and sessions
README.md - RQ queue → Redis: stores jobs
README.md - Background jobs → PostgreSQL + pgvector: records job state
apps/api/jobs/ingestion_job.py