Skip to content
cbrock84Public

About

In-app feedback that tells people when their report ships.

Topics

Resources

Contributing

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Repository files navigation

Heardback

In-app feedback that tells people when their report ships.

Heardback adds a ? button to every page of your web app. People take a screenshot, mark it up, hide anything private, and send it with the page address and the errors the page hit. Your team triages it, and when the fix or feature goes live, the reporter gets one email and a banner that says "Your feedback #N is in." That last step is the point: people keep reporting when they hear back.

Report a bug, triage it, mark it fixed, and the reporter hears back

Try it: heardback-demo.chrisbrockllc.com. You get a private sandbox with sample reports. Send feedback, triage it on the board, mark it Fixed, and read the email in the Outbox. Nothing is emailed for real, and each sandbox is deleted after an hour.

What you get

  • Capture: one-click screenshot of what is on screen, with Pen, Box and Hide (solid redaction), or an image of their own. Password and card fields are always blacked out. Page address with tokens removed, screen size, browser, recent script errors and failed requests, and the last few clicks and page changes.
  • Point at it: people click the exact element they mean; the report keeps a stable selector and pins it on the screenshot.
  • Triage: a board and a filterable list, priority, tags, assignee, merging of duplicates, a detail view, a copy-as-prompt button for coding agents, one-click issues in GitHub, GitLab or any tracker, a private staff note, and CSV export.
  • Admin dashboard: an overview (new this week, open, median days to fix, reporters told, a 30-day chart), bulk edits on the list, and help text in "i" hovers instead of under every field.
  • Keyboard triage: a command menu (Ctrl/Cmd+K), j/k to move, 1 to 5 to set the state, e to edit, Shift-click to select a range, and drag-and-drop on the board. Press ? for the full list.
  • Branding: product name, color and logo for the admin and the emails, plus sender name, sign-off, support address and footer, with a live email preview and a "Send me a test" button.
  • Webhook: each new report is POSTed as JSON with a text line, so a Slack or Teams incoming webhook works as is.
  • Page guides: write a short how-to for any page, and the same ? button offers "Help for this page": numbered steps, a Show me walk-through that highlights each button or field in turn and moves on when it is used, an automatic first-visit open, and "Did this help?" counts per guide. Keep guides in one Markdown file with your docs: Heardback syncs it, docs pages can show the same steps, and steps that stop matching the page are reported.
  • Review links: show the widget only to admins and people with a link, for client sign-off.
  • Known issues and Roadmap: public pages so people do not report the same thing twice, and a roadmap where shipping an item notifies everyone linked to it.
  • Closure notice: a "fixed" email that says whether it was a fix or a new feature, with optional how-to steps and a help-page link, plus an in-app banner until the reporter opens it.
  • Review API: a bearer-token API and a small CLI so a script or a scheduled coding agent can read reports, open issues, and close the loop. An optional twice-daily review routine is included.
  • Housekeeping: new-report alerts to admins, page usage counts, and retention (screenshots deleted 180 days after a report closes).

Add it to any site

Run the app (below), then paste one line into your site, or inject it with Cloudflare, Google Tag Manager, Netlify or WordPress. No code changes needed. See docs/INSTALL.md.

<script src="https://feedback.example.com/embed.js" async></script>

Run it yourself

The standalone app runs Heardback as its own site: the reporter pages, the board and the admin screens, plus a sample page with the widget so you can try it end to end. It has no npm dependencies.

Deploy to Cloudflare Deploy to Render

Where How
Cloudflare Use the button. It creates the Worker, a D1 database and an R2 bucket. Or run npx wrangler deploy (config in wrangler.jsonc).
Render Use the button. It reads render.yaml: a Docker web service with a disk for the database and screenshots. Pick an instance type that supports disks.
Railway New Project > Deploy from GitHub repo > cbrock84/heardback. It builds the Dockerfile (railway.json). Add a volume mounted at /data, then generate a domain.
Docker docker compose up -d and open http://localhost:3000.
Node 22.5+ npm start

Nothing has to be set first. Open the app and choose the admin password; the first person to open it does this, so finish setup right after deploying. The signing secret is generated and kept in the database. APP_SECRET and ADMIN_PASSWORD still work when set; ADMIN_PASSWORD turns first-run setup off. Environment settings are in .env.example; branding, the email wording and the webhook are set on the Settings page. npm run demo starts it in demo mode (private hourly sandboxes and an on-page outbox instead of email), which is what the public demo runs.

Two things to know before using it for real:

  • Sign-in. The built-in sign-in takes any email, so it is for trying Heardback out. For real use, put the app behind your own sign-in (an identity-aware proxy) and set TRUSTED_EMAIL_HEADER to the header that carries the person's email, or embed the kit in your own app (below).
  • Email. Set EMAIL_WEBHOOK_URL and Heardback POSTs each message as JSON ({from, to, subject, html, text}) to your mail service or a small relay. Without it, emails go to the log. from is EMAIL_FROM, with the sender name from Settings when EMAIL_FROM is a bare address. The logo in emails is loaded from /brand/logo, so set APP_ORIGIN to the public address.

To collect feedback inside your product, add the snippet (above). To run the kit inside your own server instead, embed it as described next.

How it is built

Heardback is a porting kit, not a framework plugin. The reference server is plain JavaScript (ES modules, no dependencies) written against five small adapters you supply: database, file storage, auth, email and error log. The browser widget is vanilla JavaScript with one dependency, html-to-image. Use it as is in a Node app, or hand dist/PORTING-GUIDE.md to a developer or a coding agent and port it to your stack.

app/         standalone app: router, pages, demo sandbox, Node and Cloudflare entry points
client/      widget (feedback.js, guides.js, widget.html, feedback.css)
injector/    Cloudflare Worker that adds the snippet to every page of a site
server/      feedback-core.js (pure helpers), feedback-server.js (handlers)
migrations/  sqlite.sql, postgres.sql, upgrade-2.1.sql, upgrade-2.2.sql, app.sql (standalone app only)
routine/     feedback-cli.sh, review-prompt.md (optional scheduled review)
examples/    SQLite and Postgres db adapters
docs/        GUIDE.md: behavior, endpoints, security rules, install checklist, acceptance tests
test/        node:test suites (SQLite and Postgres)

Embed it in your app

  1. Run the migration for your database (migrations/sqlite.sql or migrations/postgres.sql). Upgrading from 2.0: run migrations/upgrade-2.1.sql, then migrations/upgrade-2.2.sql. From 2.1: run migrations/upgrade-2.2.sql.
  2. Build a ctx object from your app's database, file storage, auth, email and error log. See examples/ and section 3 of the guide.
  3. Route the endpoints in section 7 of the guide to the handlers in server/feedback-server.js.
  4. Add client/widget.html, client/feedback.css, client/feedback.js and client/guides.js to your layout, and set the host settings at the top of feedback.js.
  5. Schedule sweep() hourly and purgeRetention() daily.
  6. Walk the install checklist (section 22) and the acceptance tests (section 23).

Tests

npm test                 # SQLite (node:sqlite, Node 22.5 or later)
TEST_DB=pglite PGLITE_PATH=/path/to/@electric-sql/pglite/dist/index.js npm test   # Postgres

Security

Screenshots are checked by magic bytes and served with nosniff. Reporter writes require a same-origin request. Tokens are removed from page addresses. The review API is off until you set a token, and compares it in constant time. Everything a reporter writes is treated as data when handed to a coding agent. See SECURITY.md and section 19 of the guide.

License

MIT. See LICENSE.

About

In-app feedback that tells people when their report ships.

Topics

Resources

Contributing

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages