How to Build an AI Support System That Automatically Routes Bugs to GitHub with Next.js and Jev
Published on October 2, 2026 · #AI
By Andrew Baisden
Every website receives feedback, and most of it ends up in awkward places. A visitor finds a broken button and emails you. Someone else leaves a comment on social media about a page that won't load on their phone. A third person submits a feature idea through your contact form, and it sits in your inbox between a newsletter and a receipt.
When you finally sit down to fix things, the bug reports are scattered across three platforms. Half of them lack critical details, and the ones that do make it into GitHub were manually copied there—sometimes with the visitor's email address still attached to a public issue.
I wanted something better for my own projects, so I built it. IssueRelay gives any React website a small support widget where visitors can ask a question, report a bug, or suggest a feature. Every report is saved to your own database first. Then an AI model called Jev classifies it, a set of plain rules in code decides where it goes, and you review it in a private dashboard.
When you confirm that a report is a bug, IssueRelay creates one clean GitHub issue for it with the visitor's private details removed. When you later close that issue on GitHub, the support ticket closes automatically.
In this tutorial, you'll learn how the entire system works—from the widget in the browser to the webhook that keeps GitHub and the dashboard in sync. You'll also see how to deploy your own copy in about 15 minutes.
IssueRelay is open source on GitHub at andrewbaisden/issuerelay, the widget is published on npm as @issuerelay/widget, and it's running in production on my portfolio website right now.
I won't paste the entire codebase into this article. The repository contains every file, and the setup guide walks through installation step by step. Instead, I'll show you the key architectural pieces and explain how they fit together.
Architecture Overview
The Frontend Widget
The support widget is a lightweight React component that can be embedded in any Next.js or React application. It renders a floating button that opens a support form where users can submit their questions, bug reports, or feature requests. The widget handles client-side validation and submits reports to your backend API.
The Backend API
Built with Next.js API routes, the backend receives incoming reports and stores them in your database. It then triggers the AI classification pipeline using Jev, which analyzes the report content and categorizes it as a bug, feature request, or general question. Based on the classification and your custom rules, the system routes the report appropriately.
AI Classification with Jev
Jev is the AI model that powers the classification engine. It processes the natural language of each report and determines its category with high accuracy. The system then applies a set of configurable rules—written in plain code—to decide the next action: create a GitHub issue, flag for manual review, or send an auto-response.
GitHub Integration
When a report is confirmed as a bug, IssueRelay creates a GitHub issue via the GitHub API. Before creating the issue, it strips out any personally identifiable information (PII) to protect user privacy. The issue includes relevant technical details while keeping sensitive data out of the public repository.
The Dashboard
The private dashboard gives you a centralized view of all support tickets. You can review reports, see their AI classification, merge duplicates, and approve or reject GitHub issue creation. The dashboard also displays the status of each ticket and syncs with GitHub via webhooks.
Webhook Synchronization
When you close a GitHub issue, a webhook notifies IssueRelay, which then automatically closes the corresponding support ticket in your dashboard. This two-way sync keeps your support queue and your GitHub repository aligned without manual intervention.
Getting Started
To deploy your own instance of IssueRelay, follow these steps:
- Clone the repository from GitHub.
- Install dependencies using npm or yarn.
- Configure environment variables for your database, GitHub token, and Jev API key.
- Run the database migrations to set up the required tables.
- Deploy the Next.js app to your preferred hosting platform (Vercel, Netlify, etc.).
- Embed the widget in your React application by installing
@issuerelay/widgetfrom npm and adding it to your layout.
The complete setup guide in the repository provides detailed instructions for each step, including screenshots and troubleshooting tips.
Conclusion
IssueRelay solves a real problem: it takes scattered, messy feedback and turns it into organized, actionable support tickets with automatic GitHub issue creation. By combining Next.js, Jev AI, and a privacy-first design, it streamlines the entire bug reporting and resolution workflow.
Whether you're running a small side project or a growing SaaS product, IssueRelay can save you time and help you respond to your users faster. Try it out, contribute to the open-source project, and make your support process smarter.
via FreeCodeCamp
