AI-native feedback collection. One script tag (or one prompt to a coding agent) adds a customizable feedback form to any website; submissions land in a dashboard where you can also redesign the form.
| Path | What it is |
|---|---|
apps/api |
Hono API on Railway — feedback ingest, widget config, serves widget.js |
apps/web |
Next.js dashboard — Better Auth, inbox, form designer, setup page |
packages/db |
Drizzle schema + client shared by api and web |
packages/widget |
Embeddable Shadow-DOM widget (script tag + npm entry) |
examples/demo.html |
Local host page to test the widget |
pnpm install
docker compose up -d # Postgres on :5433
cp .env.example .env # defaults work locally
pnpm db:push # create tables
pnpm --filter @feedback/widget build # build widget bundle once
pnpm dev # api on :8787, web on :3000The api and web apps read .env from the repo root (dotenv) — or export the
variables in your shell.
- Open http://localhost:3000, sign up. A project + API key is created automatically.
- Grab the key from Dashboard → Setup, paste it into
examples/demo.html. - Open the demo page, click Give feedback, submit — it appears in the inbox.
- Change colors/text in Dashboard → Design, reload the demo page.
<script src="https://YOUR-API.up.railway.app/widget.js" data-api-key="fbk_..." defer></script>- Add
data-feedback-triggerto any button to make it open the form. - No trigger present → a floating button is injected (disable:
data-button="false"). window.feedbackDev.open()/.close()for programmatic control.- Agents: fetch
/installon the dashboard domain for full instructions;llms.txtis also served.
API + Postgres on Railway
- Create a Railway project with a Postgres service; note
DATABASE_URL. - Add a service from this repo.
apps/api/railway.jsonbuilds the widget and the api; start command isnode apps/api/dist/index.js. - Set env:
DATABASE_URL,NODE_ENV=production. - Run migrations once:
DATABASE_URL=... pnpm db:push.
Dashboard (Vercel or Railway)
- Root directory
apps/web. - Env:
DATABASE_URL(same Postgres),BETTER_AUTH_SECRET(long random string),BETTER_AUTH_URL(the deployed dashboard URL), andNEXT_PUBLIC_API_URL(the deployed api URL, used in setup snippets).
See CONTRIBUTING.md. Security issues: see SECURITY.md.