DEV Community

Cover image for I Wanted AI Code Review I Could Actually Own. So I Built Codra.
Devarshi Shimpi
Devarshi Shimpi

Posted on • Originally published at devarshi.dev

I Wanted AI Code Review I Could Actually Own. So I Built Codra.

I wanted AI code review I could actually own.

Not access through a subscription or a black-box service with its own limits. The deployment, credentials, providers, and usage under my control.

I kept hitting usage limits mid-week during deep building sessions. The models were capable. The workflow was useful. But access still depended on somebody else's weekly allowance, and centralized platforms can change whenever the company behind them decides to. Pricing, quotas, models, plan boundaries.

A workflow that fits this month may sit behind another subscription next month. I could not find a reliable open-source option that gave me the ownership model I wanted. So I built one.

codra-ai-code-review-dashboard

That became Codra: A self-hosted AI review engine built around bring-your-own models, your own data boundary, and no Codra-imposed usage ceiling.

What Codra Is

Codra is an open-source, self-hosted AI code review engine for GitHub pull requests.

It listens to pull request events, reviews changed files, posts inline findings, and provides a dashboard for jobs, repositories, model routing, history, usage, and failures.

codra-github-inline-pr-comment

It runs on Cloudflare Workers and uses:

  • Cloudflare Queues for review jobs
  • PostgreSQL through Hyperdrive for storage
  • KV for sessions and cache
  • A React dashboard for operations

The GitHub App, model credentials, database, and review history are yours. Provider keys are encrypted with AES-GCM using your deployment secret.

Bring Your Own Model, Bring Your Own Limits

Changing providers does not require replacing your review history, configuration, or workflow.

You configure the provider and model. Supported:

  • OpenAI-compatible APIs
  • OpenRouter
  • Anthropic
  • Google / Gemini
  • Cloudflare Workers AI

Why Self-Hosted Matters Here

A large frontend repo and a tiny backend repo should not need the same review strategy.

Each repository gets its own review settings. You tune triggers, skip generated files, ignore drafts, use mention-triggered reviews, configure labels, set file limits, and define custom rules.

What Codra Actually Does

Codra is not just a prompt wrapped around a diff.

It includes the pieces needed to operate AI review as a system:

  • Automatic and mention-triggered reviews
  • Inline comments, summaries, and check runs
  • Per-repository rules and skipped paths
  • Provider fallbacks and size-based model routing
  • Queue-backed, chunked processing with retries
  • Dead letter queue recovery
  • Job history, usage, repository, and model dashboards

The boring pieces are the point.

codra-dashboard-job-issues

Production software is mostly unhappy paths: provider outages, malformed output, large diffs, stale jobs, superseded reviews, and failed queue runs.

Codra exists because those details matter.

Open Source Is Part of the Product

Codra is AGPL-licensed because "own your AI review loop" only means something when the system is inspectable.

Developers can inspect how jobs, diffs, prompts, fallbacks, comments, failures, and repository settings work. AI code review is still early, and those questions are better answered in the open:

AI code review is still early. There are open questions everywhere:

  • Which models work best for different kinds of PRs?
  • How strict should automated review be?
  • How should local models and repository context fit in?
  • How do we reduce noise without missing real bugs?

Those questions are better answered in the open.

Codra should improve through real codebases and community contributions to prompts, providers, docs, tests, and defaults.

What Comes Next

Still in beta, but the foundation is there. The next phase has three tracks.

The next phase has three main tracks.

Deployment Targets

Cloudflare Workers stays the primary target. These paths are for teams and
individuals who want to run Codra on infrastructure they already control.

discord-other-hosting-support-cloudflare-issue

  • Vercel Functions adapter and other serverless runtime support
  • Conventional server deployment via Node.js and PM2 for EC2 or any VM
  • A Docker-first deployment path for platforms like Hetzner, DigitalOcean, and Coolify

Stability and Developer Experience

The review pipeline works. The focus now is making it hold up under real-world load
and easier to get running without friction.

  • A more robust pipeline that handles large PRs reliably
  • Cleaner installation, configuration, and debugging flows for first-time deployers
  • Community-driven defaults and real-world review config examples

Provider and Model Support

Inference should not be locked to hosted APIs. Local and self-hosted models will
become a first-class option alongside the existing provider list.

  • Improved support across existing providers
  • Routes for local and self-hosted models, Ollama, LM Studio, and similar
  • More language-aware review behavior per file type

Own the Review Loop

Providers, pricing, and quotas will keep changing. Your review engine should not have to change with them.

codra-cta-banner

Codra is open source on GitHub. Try it, star it, break it, file issues, and help shape where it goes next.

Docs: https://codra.run/docs

Read more

Top comments (0)