Turn runtime errors into pull requests
nreactive ingests an error, packs the relevant code, asks an LLM for a fix, and opens a draft PR on GitHub or MR on GitLab for human review — all on infrastructure you control.
How it works
From error to reviewable fix
- 1
Send an error
POST an error message, the code area, and any runtime context to /api/send. It is queued and you get back a record id.
- 2
Pack the code
A background poller shallow-clones the target repo and uses repomix to pack only the relevant files into focused context.
- 3
Ask an LLM
The error plus packed code becomes a prompt. The LLM returns a title, summary, and the exact files to change.
- 4
Guardrails
The proposed fix is checked against a path allowlist, a max files-changed limit, and a max diff size before anything is written.
- 5
Open a PR / MR
A prefixed branch is created, committed, and pushed, then a draft pull request (GitHub) or merge request (GitLab) is opened for review.
Quick start
Run it in five steps
Clone the repo, point it at your LLM key and a scoped git token, and you are live.
# 1. clone + install
git clone https://github.com/nmaties/nreactive.git
cd nreactive
npm install
# 2. configure
cp .env.example .env
# edit .env: LLM key, git host token, DEFAULT_REPO, INGEST_API_KEY
# 3. start a database (Postgres or Mongo)
docker compose up -d postgres
# 4. (Postgres only) run migrations
npm run prisma:migrate
# 5. run
npm run devSend your first error
POST an error to /api/send; the record flips from pending to done and a draft PR/MR appears on your repo.
curl -X POST http://localhost:3000/api/send \
-H "content-type: application/json" \
-H "x-api-key: $INGEST_API_KEY" \
-d '{
"error": "TypeError: Cannot read properties of undefined (reading \"id\")",
"area": ["src/users", "src/lib/auth"],
"context": "Thrown in production when a session token is expired."
}'What you get
Everything in one self-hosted app
Self-hostable
Run it on your own infra. No SaaS, no lock-in — just a Next.js app and a database you control.
GitHub & GitLab
Opens draft PRs on GitHub or MRs on GitLab using a scoped token. It never pushes to your default branch.
LLM-agnostic
Works with OpenAI by default and Anthropic as an alternative. Swap the model with an env var.
Built-in guardrails
Path allowlist, max files changed, and max diff size keep generated fixes small and reviewable.
Postgres or Mongo
Pick your storage backend with DB_DRIVER — Prisma/Postgres by default, or Mongoose/MongoDB.
Dashboard included
Every error is listed with its outcome — whether a PR was opened, and exactly why if it wasn't.
It's open source — contributions welcome
nreactive is built in the open. Star the repo, file an issue, or send a pull request — new git hosts, LLM providers, guardrails, and docs are all fair game.