An agent for Next.js that opens GitHub PRs based on PostHog analytics (with automatic 48h rollback).
Hey r/nextjs,
We built a tool called Velyr to automate conversion rate optimization specifically for the Next.js/Vite ecosystem.
Instead of using client-side scripts that mess with the DOM and tank your Core Web Vitals, Velyr works directly with your codebase to implement clean, component-level fixes based on real user data.
The workflow:
It connects to your PostHog instance to monitor user behavior, drop-offs, and layout friction.
It identifies UI bottlenecks and generates the exact React/Next.js code needed to fix it.
It opens a GitHub Pull Request and texts you via Telegram.
You approve the PR directly from your chat.
Auto-Revert: If PostHog data shows a 15%+ bounce rate spike or a conversion drop within 48 hours, Velyr automatically reverts the PR.
This keeps your site fast, ensures clean code in your repository, and safeguards your production environment.
We'd love to get some technical feedback from fellow Next.js devs on this setup.