An unfamiliar repository raises practical questions: where does a request go, which modules depend on each other, and what evidence supports a suggested change? Chat over code gives fluent answers with nothing to check them against.
Approach
CodeForge imports a repository, records the commit it scanned, maps observed imports into a dependency graph and answers from retrieved source. Every citation opens the file and line range at that commit, so an answer can be verified rather than trusted.
My contribution
Personal project, built end to end: FastAPI backend, Next.js frontend, Supabase schema and migrations, retrieval, streaming chat and CI. The README credits me with the line-aware chunking, cached embeddings, persisted scan stages and streamed answers.
Who it helps
Ask a question about a GitHub repository and follow the answer back to the exact file and line, at the commit that was scanned.
Scanning parses a repository into chunks and an import graph, embeds the chunks and stores both in Postgres with pgvector. Chat retrieves by vector similarity and full-text search separately, fuses the rankings, and streams a Groq answer whose citations point at file and line ranges at the scanned commit.
Interface
API
Scanning
Retrieval
Data & models
Implemented at this commit
External service
Branch only
Call or data flow
In the code at this commit
Next.js app
Repository import, scan progress, React Flow architecture explorer, streamed chat with citations and PR review.
In
GitHub authorisation via Supabase, user actions
Out
Authenticated API calls; server-sent event streams
Failure
Expired credentials, missing permissions and rate limits are classified separately when importing repositories.
Trade-off
One app for every view keeps state shared; it also makes the dashboard the largest frontend file.
Flow
← Public env guard (build check) · → FastAPI service (REST + SSE)
Next.js app (in the code at this commit). Repository import, scan progress, React Flow architecture explorer, streamed chat with citations and PR review. Sends to: FastAPI service.
Public env guard (in the code at this commit). Refuse to build if a NEXT_PUBLIC_ variable holds a Supabase secret key or a service-role JWT. Sends to: Next.js app.
FastAPI service (in the code at this commit). 22 routes: repository import and status, source, architecture, security and debt reports, chat (plain and streamed), PR review, contact. Sends to: GitHub client, Scanner, Hybrid retrieval, PR review check.
GitHub client (in the code at this commit). Fetch repositories, classifying GitHub errors so public analysis does not depend on a possibly revoked user token. Sends to: nothing.
Scanner (in the code at this commit). Parse Python, JS/TS, Java/Kotlin and Go/Rust files; resolve imports into a dependency graph; chunk with line ranges; persist each stage. Sends to: Embeddings, Health & security reports, Supabase Postgres.
Health & security reports (in the code at this commit). Deterministic source rules, redacted findings, file-size debt and import cycles. Sends to: nothing.
Embeddings (external service, called from the code). Embed chunks and queries with Gemini at 768 dimensions under a request-rate limit. Sends to: nothing.
Hybrid retrieval (in the code at this commit). Vector top-10 (threshold 0.25) and full-text top-10, fused by reciprocal rank (k = 60); up to 8 chunks and 18,000 characters. Sends to: Supabase Postgres, Groq chat.
PR review check (in the code at this commit). Keep only AI recommendations whose locations are real added lines in the submitted diff. Sends to: nothing.
Groq chat (external service, called from the code). Generate and stream answers from retrieved context. Sends to: nothing.
Supabase Postgres (in the code at this commit). Users, repositories, scans, chunks with pgvector, chat sessions; row-level security and transactional chat RPCs. Sends to: nothing.
B.03 — Technical decisions
Decisions, and why.
Import
Parse
Map
Analyze
Index
Ask
Cite
01
Retrieval must stay inside the selected repository.
Vector and lexical RPCs are scoped by repository. Results are fused by reciprocal rank and bounded before they reach the model.
02
An interrupted stream must not be saved as a finished answer.
Durable request claims and transactional persistence distinguish busy, completed, failed and replayed requests.
03
Embedding failures must stay visible.
Batch limits, vector validation, bounded retries and persisted coverage report a partial or failed scan instead of a silent success.
04
A revoked token shouldn't break public analysis.
Public access is attempted independently; hidden repositories retry only with the user's own GitHub authorization.
05
Generated review comments can point at the wrong line.
Diff parsing limits pull-request recommendations to lines that were actually added, in supported categories.
06
A secret must never become browser configuration.
Public config rejects Supabase secret keys and service-role JWTs; a release check scans Git content without printing credentials.
B.04 — Reliability and evaluation
What was verified, and how.
119
backend regression tests passing
22
frontend regression tests passing
23
pages in the production build
2-user
RLS isolation replayed on disposable Postgres in CI
Test counts are the documented results in the project README. Latest CI on the default branch: CI success · main · 18 Oct 2026
What CI runs on every push (.github/workflows/ci.yml @ 62d8979)
frontend — npm ci · npm run lint · npm run typecheck · npm test · npm run build · npm audit --omit=dev
CodeForge AI backend, pinned. Every Python module in codeforage-ai @ 62d8979 , split into one chunk per top-level function or class, searched with the same hybrid score and gate. CodeForge itself fuses pgvector and full-text rankings; this demo is lexical only, so it misses questions phrased differently from the code.
B.05 — Trade-offs, limitations and status
What it doesn’t solve, stated plainly.
Repository code is parsed, never executed. Retrieved source is treated as untrusted data.
The scan worker runs in-process with persisted state and stale-job recovery. It is not a distributed queue.
Citations make model output checkable. They don't make it correct.
Current status Live demo on Vercel. Actively developed; CI runs database, backend and frontend checks on every push.