DiffJury
September 18, 2026 · View on GitHub
Jev decides if this PR is risky or not.
Paste a public GitHub pull request URL and hit Analyze. One click fetches the PR dossier (title, body, diff, contributors) and runs a TypeSafe Jev systemOne judgment — risk bars, noul probabilities, and a verdict. No essays. No second button.
How it works
- Landing: one large URL field. Optional quiet sample chip.
- Analyze fetches
POST /api/github-pr, then immediatelyPOST /api/review. - Success opens a split view — dossier on the left, judgment on the right.
- Failure stays on the landing screen with a clear error.
Large PRs are trimmed locally to fit Jev's ~32k/64k token limits; small PRs keep their full, unchanged context.
Stack
- Next.js 15 App Router + TypeScript + Tailwind
@typesafe-ai/sdk(TypeSafeClient.systemOne, modeljev-latest) — server-only viaPOST /api/review- Env:
TYPESAFE_API_KEY(never exposed to the browser) - Optional:
GITHUB_TOKENfor higher GitHub API rate limits when fetching public PRs
Jev questions (single call)
| Key | Type | Meaning |
|---|---|---|
risk | Score | Overall merge risk |
review_depth | Choice | skim / standard / deep |
needs_design | Noul | Design discussion needed? |
needs_security | Noul | Security review needed? |
merge_blocker | Noul | Block merge until fixed? |
missing_tests | Score | Test coverage gaps |
docs_debt | Score | Documentation debt |
blast_radius | Score | How wide a bug could spread |
verdict | Choice | approve_with_nits / request_changes / block |
Local run
npm install
cp .env.example .env.local
# put your keys in .env.local — never commit them
# TYPESAFE_API_KEY=...
# GITHUB_TOKEN=... # optional; public unauthenticated API works
npm run dev
# open http://localhost:3000
Production locally:
npm run build
npm run start
API
POST /api/review
Unchanged. Accepts a PR payload and returns Jev answers.
{
"title": "string",
"body": "string",
"diff": "string",
"ciLog": "string (optional)",
"linkedIssue": "string (optional)"
}
Response includes answers, model, latency_ms, and usage.
POST /api/github-pr (also GET ?url=)
Fetches a public GitHub PR via the REST API (no user OAuth). Uses unauthenticated requests by default; set GITHUB_TOKEN on the server for higher rate limits.
{ "url": "https://github.com/owner/repo/pull/123" }
Response includes title, body, diff, author / contributors (login + avatarUrl + htmlUrl), linkedIssues, file stats, and metadata. Clear errors for invalid URL, 404/private, and rate limits.
Railway
- Create a new Railway service from this repo (Docker or Nixpacks).
- Set variable
TYPESAFE_API_KEYin the Railway service environment (same name as local). - Optionally set
GITHUB_TOKENfor higher PR-fetch rate limits. - Railway injects
PORT; the Dockerfile and Nixpacks start command bind0.0.0.0. - Health:
GET /serves the UI.
Dockerfile — multi-stage Next.js standalone build (preferred if you select Docker).
Nixpacks — nixpacks.toml uses Node 22, npm ci, npm run build, then next start -H 0.0.0.0 -p $PORT.
Security
TYPESAFE_API_KEYandGITHUB_TOKENare read only fromprocess.envon the server.- Ship
.env.examplewith empty values; do not commit real keys. - No GitHub OAuth, no database, no LLM fallback in v1.
- PR fetch only works for public repositories.
License
Demo app for TypeSafe Jev.