Open Source · MIT License

Your Laravel App
Fixes Itself

Healing-Factor catches production exceptions and automatically creates pull requests with AI-generated fixes. Install, configure, and let your app self-heal.

Healing-Factor dashboard showing a list of resolved issues with status, source, attempts, and PR links

Everything you need for self-healing apps

Healing-Factor is a drop-in Laravel package that transforms exceptions into actionable pull requests, powered by AI.

Automatic PR Creation

When an exception fires, Healing-Factor spins up an isolated git worktree, runs AI to fix the code, and opens a draft PR on your repo.

Multiple AI Drivers

Use Claude Code or OpenCode as CLI drivers, or the Anthropic API driver directly. Full flexibility to match your stack.

Smart Deduplication

3-layer dedup with fingerprinting, cache debounce, and database checks. The same exception never triggers duplicate work.

Secure by Design

HMAC webhook verification, git worktree isolation, environment whitelisting, and no shell injection vectors.

Built-in Dashboard

Dark-themed web dashboard with search, status filters, PR links, retry actions, and real-time polling at /healing-factor.

Exception Categories

Customize AI behavior per exception type — different prompts, timeouts, models, and tools for quick fixes vs. complex bugs.

How it works

From exception to pull request in 8 automated steps. No human intervention required.

01

Exception Caught

Your app throws an exception. Healing-Factor's listener or Nightwatch webhook captures it instantly.

02

Fingerprinting

A unique fingerprint is generated from the exception class, message, file, and line number.

03

Deduplication

3-layer check — cache debounce, database lookup, and status validation prevent duplicate work.

04

Issue Created

A new issue record is stored with full exception details, stack trace, and metadata.

05

Job Dispatched

A queued ResolveIssue job picks up the work asynchronously on your queue worker.

06

Git Worktree

An isolated git worktree is created so AI operates on a clean copy — never touching production code.

07

AI Generates Fix

Claude Code or OpenCode analyzes the exception and writes a targeted fix with full context.

08

PR Opened

A draft pull request is created on GitHub with the fix, ready for your team to review and merge.

Works with your tools

Plug Healing-Factor into your existing monitoring and AI setup. No lock-in.

Claude Code

Use Anthropic's Claude Code CLI as the AI driver to analyze exceptions and generate fixes.

OpenCode

Prefer OpenCode? Swap the CLI driver in your config and Healing-Factor handles the rest.

Nightwatch

Connect via HMAC-signed webhooks. Nightwatch fires, Healing-Factor fixes. Zero effort.

Up and running in minutes

Install the package, run the setup command, configure your .env, and you're done.

Terminal
# Install the package
composer require arielmejiadev/healing-factor

# Run the installer (publishes config, migration, and dashboard)
php artisan healing-factor:install

# Run migrations
php artisan migrate

Option A: Exception Listener

Catches all unhandled exceptions automatically.

HEALING_FACTOR_MONITOR=exception_listener

Option B: Nightwatch Webhook

Receives exceptions via Nightwatch's webhook.

HEALING_FACTOR_MONITOR=nightwatch

AI + Laravel — what's next?

Join the waitlist for early access to new releases, AI-powered Laravel tools, and packages we're building next.

Let your app fix itself

Healing-Factor is free, open source, and ready for production Laravel apps.