AI-Powered Feedback Widget - Open Source

The Problem

“It’s broken.” That’s the entire bug report. No reproduction steps, no context, no expected behavior. Now multiply that across multiple projects, add feature requests that say “can you make it better?”, and someone has to manually turn all of it into actionable GitHub issues. I needed this solved once, not reimplemented in every project.

The Solution

An open-source Laravel package (published on Packagist) that adds an AI-powered feedback chat widget to any Laravel + Inertia + Vue 3 application. Install via Composer, configure GitHub App credentials, and every project gets a fully functional feedback pipeline: capture, structure, and deliver to GitHub.

AI-Guided Conversations

Three feedback types, each with a tailored prompt strategy:

  • Bug reports: the AI asks for reproduction steps, actual vs. expected behavior, then confirms understanding before creating the issue
  • Feature requests: the AI asks about use case, desired behavior, and priority (2-4 follow-ups), then confirms before creating the issue
  • General feedback: immediately structured and submitted on the first message, no follow-ups needed

The AI embeds a __done__ sentinel with structured JSON (title + body) when the conversation is complete. A custom parser using brace-depth walking extracts the JSON, handling multibyte characters correctly (e.g., French accented text).

GitHub App Authentication

The package generates RS256-signed JWTs using the GitHub App’s private key (9-minute expiry), exchanges them for installation access tokens via the GitHub API, and caches tokens for 50 minutes to minimize API calls. Issues are created with automatic labels (user-feedback + type-specific: bug, enhancement, feedback) and user attribution.

Self-Contained Frontend

Zero external CSS dependencies. Replaced Tailwind with self-contained scoped CSS using namespaced class names and CSS custom properties for consumer overrides. Inline SVG icons, no icon library. Full accessibility: ARIA attributes, focus trap, keyboard navigation (Tab/Shift+Tab, Escape to close). Screenshot support via clipboard paste or file picker. CSRF token auto-refresh on session expiry with automatic retry.

Full Configurability

Route prefix, middleware, rate limits, OpenAI model selection, GitHub App credentials, screenshot storage disk and path, app name and locale (controls AI response language), and 24 translation keys for complete i18n support.

Tech Stack

Outcomes

  • 7 releases iterated from initial extraction to production-ready package (v1.0.0 to v1.3.2)
  • 44 PHP tests and 16 TypeScript tests covering chat flows, HTTP error handling, GitHub API integration, service provider bindings, and translation merging
  • Zero external CSS dependencies, full accessibility, and complete i18n support
  • Published on Packagist, MIT licensed, ready to drop into any Laravel + Inertia + Vue 3 application

Want to try it out? Check out the GitHub repo and install it with composer require twisted-binary/laravel-feedback-widget.