Skip to content

Mic-360/ai-feedbacks

Repository files navigation

AI Feedbacks

Self-hosted bug-feedback platform. Capture a region of any web page from a Chrome extension, attach console + network logs and a description, and the website turns it into a copy-pasteable fix prompt for your AI coding agent.

What's new in this redesign

  • Per-project context — Register a website + GitHub repo. The server fetches the repo (public only) and Gemini generates a context.md describing the project. That context becomes the system prompt for fix generation and chat.
  • RustFS storage — All persistent state (images, logs, manifests, fix prompts, chat threads) lives in a self-hosted S3-compatible bucket.
  • Fix on demand — Submitting a feedback no longer triggers Gemini. Fix prompts are generated when you click "Generate Fix" on a feedback card, and every generation is appended to a versioned history.
  • Repo Q&A chat — A floating chat opens anywhere; pick a project and ask questions answered against its context.md.
  • Search rewritten — Natural-language search over a project's feedbacks (description + log excerpt) returns matching IDs.
  • Extension URL gating — The extension only captures on URLs registered as projects on the site.

Tech stack

  • Web — Next.js 16 (App Router), React 19, Tailwind 4, base-ui (Shadcn-style wrappers), framer-motion, Vercel AI SDK v6
  • Modelsgemini-3.1-pro-preview (context), gemini-3-flash-preview (fix + search), gemini-3.1-flash-lite-preview (chat)
  • Storage — RustFS (self-hosted, S3-compatible) via @aws-sdk/client-s3 (forcePathStyle: true)
  • Extension — MV3, Vite + crxjs, React 19, OffscreenCanvas crop
  • Runtime — Bun

Prerequisites

  1. Bun installed.
  2. A reachable RustFS endpoint with credentials and a bucket named feedbacks (or whatever you set in env).
  3. A Google AI Studio API key for Gemini.

Getting started

bun install

Environment

Create .env.local:

GEMINI_AI_API_KEY=your-google-ai-studio-key

RUSTFS_ENDPOINT=https://storage.example.tech
RUSTFS_ACCESS_KEY=...
RUSTFS_SECRET_KEY=...
RUSTFS_BUCKET_NAME=feedbacks

NEXT_PUBLIC_SITE_URL=http://localhost:3000

Then:

bun run dev

Open http://localhost:3000.

RustFS layout

s3://feedbacks/
  projects/<slug>/
    project.json
    context.md                # generated by gemini-3.1-pro-preview
    context-job.json          # job state for context generation
    chats/<threadId>.json
    feedbacks/<feedbackId>/
      feedback.json
      image.png
      logs.txt
      fix-prompt.md           # newest version on top

Every text file carries a projectSlug / feedbackId back-pointer in its frontmatter; the JSON manifests carry forward pointers (id arrays). Any file is traceable in either direction.

Extension setup

cd extension
bun install
bun run build
  1. Open chrome://extensions/.
  2. Enable Developer mode.
  3. Load unpacked → select extension/dist.
  4. From the toolbar, click the extension icon. The popup queries /api/extension/verify against the configured site URL — if the active tab matches a registered project, you can capture; otherwise you'll be prompted to register the site first.
  5. Drag a rectangle, type a description, submit.

The popup has an inline "edit site URL" toggle to point the extension at http://localhost:3000 for development. The override is stored in chrome.storage.local.

Smoke test

After bun run dev:

  1. Open /. Submit the New project form with a website URL and a public GitHub repo URL.
  2. The page redirects to /project/<slug> with a context-generation progress bar. Wait for done (a few seconds to a minute depending on repo size).
  3. Open the registered website in another tab. Click the extension icon — the popup should show a green check.
  4. Capture a region, type a description, submit. A toast confirms.
  5. Back on /project/<slug>, the new feedback appears. Open it.
  6. Click Generate Fix in the detail sheet — a Gemini-streamed fix prompt appears and gets appended to the version history.
  7. Type a query in the search bar (e.g. "login error") — the grid filters to matching feedbacks.
  8. Click the floating chat button, pick the project, ask a repo question — the answer streams in.

Project layout

app/
  api/                          # all routes documented in docs/plans/<plan>.md §4
  project/[slug]/page.tsx + client.tsx
  page.tsx                      # project list + new-project form
  layout.tsx                    # mounts <ChatLauncher />
components/
  project/  feedback/  chat/    # UI shells calling the API routes
  ui/                           # base-ui primitives, shadcn-style wrappers
lib/
  rustfs.ts                     # S3 client + helpers
  projects.ts feedbacks.ts chat.ts
  jobs.ts jobs/context-generation.ts
  github/api.ts github/repo.ts github/tree-filter.ts
  ids.ts slug.ts url.ts logs-txt.ts fix-prompt-md.ts context-md.ts
  gemini.ts                     # central model factory
extension/
  src/{popup.tsx,content.tsx,background.ts,injected.js,site-base.ts}
docs/plans/                     # design notes
instrumentation.ts              # boot-time stale job recovery

License

Apache 2.0.

About

AI Feedbacks is a web application designed to transform application issues and bugs into actionable prompts for coding agents. Powered by Google's Gemini 3 Flash Preview, it offers a seamless way to bridge the gap between reporting an issue and fixing it.

Resources

License

Stars

Watchers

Forks

Contributors