A GitHub App that reviews pull requests with an LLM, and a React dashboard that shows what it found.
Live site: https://autoreviewerapp-mu.vercel.app (landing page) · /demo (the dashboard with public demo data) · API: https://pr-sentinel-server.onrender.com/health. The backend runs on Render's free tier, so the first load after a quiet period can take about a minute.
When a PR is opened or updated, GitHub sends a webhook to an Express server. The server verifies the signature, answers 202 straight away, and reviews the PR in the background: it fetches the changed files, drops noise (lock files, build output, binaries, huge diffs), and sends each remaining file's diff to a free LLM (Groq, with Google Gemini as fallback). The answer is validated with Zod and checked against the real diff, so only comments on lines the PR actually added survive. The top five findings (real bugs, security issues, missing error handling, logic errors, never style) are posted as one review with inline comments and a summary. Every review is stored in MongoDB and shown in the dashboard.
GitHub ──webhook──▶ Express ──202──▶ GitHub
│ verify HMAC · validate · de-duplicate
▼
review queue (one PR at a time)
│
GitHub API ◀──────┤ fetch files → filter noise
│
Groq ▶ Gemini ◀──┤ one file per request, validated output
│
GitHub API ◀──────┤ post one review: summary + inline comments
▼
MongoDB ◀── REST API ◀── React dashboard
Design and decisions: docs/PLAN.md. What a self-review of the code found: docs/CODE_REVIEW.md. Concepts explained for learning: docs/LEARNING.md.
Hard rule for this project: every service is on a free plan that needs no credit card and no billing account.
| Service | Used for | Free-tier limits that matter |
|---|---|---|
| Groq | Primary LLM (openai/gpt-oss-120b) |
30 requests/min, 8,000 tokens/min, 1,000 requests/day, 200,000 tokens/day (checked on Groq's rate-limits page, Nov 2026) |
| Google AI Studio (Gemini) | Fallback LLM | Quota varies by model and changes often; check your own at aistudio.google.com/rate-limit. Never attach a billing account to the project. |
| MongoDB Atlas M0 | Database | 512 MB storage, shared CPU/RAM |
| Render free web service | Backend hosting | Sleeps after 15 min idle (cold start of about a minute); 750 instance hours/month |
| Vercel Hobby | Frontend hosting | Free for personal, non-commercial use |
| smee.io | Local webhook forwarding | Free, no account |
| GitHub App | PR integration | Free; GitHub REST API limit 5,000 requests/hour per installation |
Limits are copied from each provider's documentation and can change; re-check them before relying on them.
AutoReviewer is a free beta. Install it on the repositories you want reviewed: https://github.com/apps/autoreviewer-app/installations/new. Then open a PR and see reviews at https://autoreviewerapp-mu.vercel.app/dashboard (Sign in with GitHub).
- Cost: free. Limits: 10 files per day per installation plus a shared daily budget; 10 files per PR.
- Privacy: diffs go to Groq (Gemini fallback for public repositories only); no code is stored; reviews are deleted after 90 days or on uninstall.
- Opt out:
skip-sentinellabel or[skip sentinel]in the title; or remove the repository from the installation. - Uninstall: https://github.com/settings/installations deletes your stored reviews.
- Report a problem: open an issue.
More in docs/BETA.md.
Needs Node 22.20 or newer.
npm run install:all
cp server/.env.example server/.env # fill in the values, see "One-time setup"
npm run dev:server # http://localhost:3000/health
npm run dev:client # http://localhost:5173 (the site; it forwards /api and /auth to :3000)
npm test # server and client tests
npm run lintTo run the whole loop on your machine, forward GitHub's webhooks with smee.io:
npm run dev:server # terminal 1
npm run smee # terminal 2: smee.io -> localhost:3000/webhooks/github
npm --prefix server run smoke:llm -- groq # optional: check each LLM key first
npm --prefix server run smoke:llm -- geminiThen install the App on a public throwaway repo and open a PR. The files in demo/ have deliberate bugs for exactly this.
These steps need your accounts, so they are yours to do.
- MongoDB Atlas: create a free M0 cluster, a database user, and allow network access for Render. Render's free tier has no fixed IP, but it publishes its outbound ranges (service page → Connect → Outbound); add those ranges to the Atlas IP Access List, which is safer than
0.0.0.0/0(and Atlas may reject0.0.0.0/0anyway). Copy the connection string intoMONGODB_URI. - Groq: create an API key at console.groq.com/keys →
GROQ_API_KEY. - Gemini: create an API key in Google AI Studio, without a billing account. Open aistudio.google.com/rate-limit, pick a Flash model that shows free quota →
GEMINI_MODEL. - GitHub App (Settings → Developer settings → GitHub Apps → New):
- Webhook URL: your smee.io channel while developing,
https://<your-render-service>.onrender.com/webhooks/githubin production. - Webhook secret: a long random string →
GITHUB_WEBHOOK_SECRET. - Repository permissions: Pull requests: Read and write, Contents: Read-only, Metadata: Read-only.
- Subscribe to events: Pull request, Installation and Installation repositories (the last two delete stored reviews when the App is uninstalled or a repository is removed).
- After creating it, note the App ID →
GITHUB_APP_ID, and generate a private key (.pem). Put it inGITHUB_PRIVATE_KEYon one line with each newline written as\n. Never commit the.pem(it is git-ignored).
- Webhook URL: your smee.io channel while developing,
- Local webhooks: open smee.io, start a channel, put its URL in
WEBHOOK_PROXY_URL.
Backend on Render. New → Blueprint, choose this repository; render.yaml describes the service. Enter the secrets it asks for (sync: false ones; render.env.example lists them all with placeholders). Set CLIENT_ORIGIN to your Vercel URL, with no trailing path. Afterwards, change the GitHub App's webhook URL to the Render URL.
Frontend on Vercel. New Project → import the repository and set the Root Directory to client. There is no API URL setting: client/vercel.json forwards /api/* and /auth/* to the Render service, so the browser only ever talks to the dashboard's own origin and the sign-in cookie is first-party. The same file serves deep links such as /reviews/<id> and sets the security headers.
Check it:
https://<render-url>/healthreturns{"status":"ok", ...}with"db":"connected".- Open a PR on a repository the App is installed on and watch it get reviewed.
- Check the rate limiter sees visitors, not the proxy: the
RateLimitresponse header carries apk=partition key. Request/api/statsdirectly on the Render URL and through the dashboard origin; if the two keys differ, setTRUST_PROXY_HOPS=2on Render so each visitor gets their own bucket instead of everyone sharing Vercel's.
Render stops an idle free service after 15 minutes, and waking takes longer than GitHub's 10-second webhook timeout, so the first webhook after a nap fails, and GitHub does not retry on its own. Two things deal with this:
- On start-up in production, the server asks GitHub for this App's deliveries from the last hour and requests a redelivery of the failed
pull_requestones (GitHub's documented recovery). Redelivering is safe because a commit is only ever reviewed once. - The dashboard says "this is taking a while, the server may be waking up" instead of looking broken.
Optional: point a free uptime pinger at /health every 10 minutes to keep the service awake.
client/ is a React + Vite + Tailwind app (dark theme) that reads the server's read-only API (GET /api/reviews, /api/reviews/:id, /api/stats, /api/me).
| Route | What it shows |
|---|---|
/ |
The landing page for visitors (live totals from /api/stats, a real bot comment, features, FAQ). A signed-in user is sent to /dashboard. |
/demo |
The dashboard with the public demo repositories and a "Demo data" banner. A signed-in user is sent to /dashboard (the API scopes data to the user, so it cannot show the demo then). |
/dashboard |
Your own reviews. A visitor who is not signed in is sent to /demo. |
/reviews/:id |
One review's findings. |
/privacy |
The privacy page. |
/admin |
Aggregate usage, for emails on the admins list only. |
The dashboard shows totals, reviews per day, issues by severity and category, and a filterable review history. Filters and the page number live in the URL, so a filtered view can be shared. The dashboard pages are loaded on demand, so the landing page does not download the chart library.
Landing page notes:
- Photos come from Unsplash (free licence) and are listed, with photographer credits, in
client/src/content/credits.js(the Unsplash licence does not require on-page credit, so the footer does not show them). The CSP allows images fromhttps://images.unsplash.comonly, besides the site itself and GitHub avatars.client/public/hero-preload.jspreloads the hero photo on/(an external file, because the CSP forbids inline scripts); a test keeps its URLs in step with the page. - Numbers on the page are real: the proof strip is live from
/api/stats(skeletons while the API wakes, a plain "unavailable" message if it fails, never a made-up number), and the engineering facts inclient/src/content/landing.jsrecord where each came from. Update them when they change. - Images in
client/public/:dashboard-preview*.webpis a screenshot of the real/demopage,og.pngis the 1200×630 social preview. - Preview against the live API:
API_ORIGIN=https://pr-sentinel-server.onrender.com npm --prefix client run previewserves the production build on http://localhost:4173 with logged-out demo data (sign-in does not work there: the session cookie belongs to the remote host).
The dashboard has a plain-English /privacy page. In short:
- Sent to the AI: the path and diff of each reviewed file go to Groq, with Google Gemini as the fallback. Private repositories go to Groq only: if Groq fails, the file is reported as not reviewed. Set
ALLOW_GEMINI_FOR_PRIVATE_REPOS=trueto let private code fall back to Gemini (its free tier may use prompts to improve Google's products; check its terms first). - Stored: no diffs or source files. Per review: repository, PR number, title, link, author login, commit SHA, file paths, and the findings. Finding text is written by the model and can quote short pieces of the code. Logs never contain diff content.
- Retention: each review gets an
expiresAtdate (REVIEW_RETENTION_DAYS, default 90) and MongoDB deletes it with a TTL index. Reviews saved before this existed are given one at start-up. - Delete: uninstalling the App (
installation.deleted) deletes every review of that installation; removing a repository (installation_repositories.removed) deletes that repository's reviews. A review still running when this happens is not written back, and a queued job is skipped.
.github/workflows/health-monitor.yml calls /health and opens (or comments on) a GitHub issue titled "AutoReviewer health check failing" when it is down, and closes it when it recovers. /health always answers 200, so the check reads the body: only "status":"ok" passes, "degraded" (database unreachable) fails. It retries for about 50 seconds to ride out a cold start.
Two schedules, pick one by editing the cron line:
*/10 * * * *(default): also keeps the free Render instance awake, so there is no ~30 s cold start. One always-on service fits in Render's 750 free hours a month.17 */6 * * *: monitoring only; the instance still sleeps between checks.
Set the target with a repository variable: Settings, Secrets and variables, Actions, Variables, HEALTH_URL (default https://pr-sentinel-server.onrender.com/health). Limits: scheduled runs can start late, and GitHub disables schedules in a repository with no activity for 60 days. Run locally with HEALTH_URL=<url> node server/scripts/check-health.js.
- Daily caps (UTC):
DAILY_FILES_PER_INSTALLATION(default 10 files) and a globalDAILY_GROQ_TOKENSbudget (default 180,000 estimated tokens, under Groq's 200,000/day). Counters live in MongoDB and are checked before each file is sent to an LLM, so a PR can be partly reviewed. When a cap stops a review the bot posts one short notice per PR per day. - Skip a PR: add the
skip-sentinellabel or put[skip sentinel]in the title. Draft PRs and PRs opened by bots are skipped too; a draft is reviewed when marked ready for review. - Kill switch: set
REVIEWS_PAUSED=trueon Render. Webhooks are answered200 ignoredand nothing is reviewed; those deliveries count as delivered, so they are not replayed afterwards.
- Feedback: every inline comment ends with a line asking for a 👍 or 👎 reaction. When a pull request closes, the server lists that PR's review comments once (GitHub includes a reaction summary on each) and stores the 👍/👎 counts per comment. Only counts are stored, never who reacted. Reactions added after the PR closes, or on PRs that are never closed, are not counted.
- Helpful rate: the dashboard shows 👍 / (👍 + 👎) as "based on N votes", scoped like every other number (you only see votes on repositories you can access).
- Admin view: admins are the email addresses in the
adminsMongoDB collection (npm run admin -- list | add <email> | remove <email>inserver/). At sign-in the user's verified GitHub emails are checked against it (needs the GitHub App's Email addresses: read account permission); only a matching email is kept on the session, and the list is re-checked on every request, so removing an email takes effect immediately. Admins getGET /api/admin/statsand the/adminpage: current and total installations, installations active in the last 14 days, PRs and files reviewed per day, quota used today, and the helpful rate. Aggregates only: no repository names, paths or comment text. Everyone else gets the same 404 as an unknown URL. - Installations record:
installationwebhooks feed aninstallationscollection (account login and type, installed and removed dates). On uninstall the account name is erased and only the dates remain.
- It never approves or blocks a PR: it only posts
COMMENTreviews. - It comments only on lines the PR added, and never on style.
- It reviews each commit once. A redelivered webhook, or a
reopenedPR with no new commit, does nothing.
- Sign-in is new and not yet open to everyone. Signed-in users see only reviews of repositories they can access on GitHub; logged-out visitors see only the public demo repositories (
PUBLIC_DEMO_REPOS). Until the launch checklist in docs/LAUNCH_PLAN.md is finished, install the App only on repositories you are happy to have reviewed by free-tier LLMs. - A webhook that arrives while the free Render instance is asleep can time out. A cold start takes about 30 seconds (measured), longer than GitHub's 10-second webhook timeout. The start-up redelivery (above) recovers such deliveries, so the review arrives late rather than never. In the App's delivery history (13 deliveries, 2026-11-16) none timed out and none needed a redelivery, but that history never included a webhook sent into a sleeping server, so the recovery path is by design, not observed. A free uptime pinger on
/healthavoids the cold start altogether. - A PR with nothing reviewable gets no comment on GitHub. If every changed file is skipped (lock files, images, build output), the bot stays silent on the PR; the dashboard still records the review with the reason each file was skipped.
- The review queue is in memory. A restart loses queued jobs; a review that was running is picked up again after 10 minutes if the same commit is redelivered. The fix is a durable queue (BullMQ + Redis), which is not free.
- Free-tier LLM limits allow roughly three files a minute on Groq, so a large PR takes a few minutes, and at most 10 files per PR are reviewed. A PR that runs past its 4-minute time budget is posted as a partial review.
- Comments are AI-generated and can be wrong. Each review says so.
The full list, with reasons, is in section 4 of docs/CODE_REVIEW.md.
server/ Express API, webhook handler, review pipeline (see docs/PLAN.md section 2)
client/ React dashboard
demo/ sample buggy files for demo PRs
docs/ PLAN.md, CODE_REVIEW.md, LEARNING.md