Developer Andrew Baisden has introduced IssueRelay, an open-source feedback system designed to collect visitor support requests from Next.js and React applications, triage them using AI, and convert confirmed bugs into GitHub issues. The system combines a React Shadow DOM widget, PostgreSQL storage, and TypeSafe's Jev model to categorize incoming tickets without exposing private user details to public repositories.
Architecture and Multi-Stage Workflow
IssueRelay processes support reports across distinct steps. Incoming submissions are initially written directly to a Neon PostgreSQL database managed via Drizzle ORM before any secondary services are invoked. Storing raw data prior to triage prevents message loss during network disruptions, third-party API outages, or rate-limiting events.
The embeddable frontend widget is published to npm as @issuerelay/widget. Encapsulated inside a Shadow DOM, the component prevents style collisions with host applications and operates alongside strict Content Security Policies. Server-side validations check incoming project keys, cross-origin rules, and unique submission identifiers to stop duplicate tickets.
AI Triage via TypeSafe Jev
Ticket classification relies on Jev, a specialized model from TypeSafe designed for discrete decision-making tasks rather than open-ended text generation. Using the official TypeSafe SDK, IssueRelay sends Jev the visitor's raw message and selected category hint while redacting names, email addresses, and ticket identifiers.
Jev evaluates the input against explicit choices to categorize the ticket (such as bug, feature request, question, or spam) and assign a severity score (ranging from low to critical). The output returns probability confidence scores. Standard TypeScript functions evaluate these confidence metrics to assign queue routes, restricting automatic GitHub escalation recommendations to bug reports meeting a minimum 0.9 confidence threshold.
Data Privacy Gate and GitHub Synchronization
Before an owner escalates a ticket to GitHub, a privacy filter screens the report content. The package scans for contact information, API keys, JSON Web Tokens, private keys, credit card details, and submitter names to keep personal data inside the private IssueRelay platform dashboard.
GitHub issues are created exclusively through a dedicated GitHub App using scoped repository permissions. An HTML comment containing a unique ticket marker is embedded in every created issue, allowing the platform to verify whether an issue was published if a network request times out. Signed webhooks handle two-way synchronization, ensuring that closing or reopening an issue on GitHub automatically updates the corresponding dashboard ticket status.
AI-generated editorial illustration; not a documentary photograph.
Source:
How to Build an AI Support System That Automatically Routes Bugs to GitHub with Next.js and Jev

Leave a Reply