Skip to content

Abhishekucs/feedback.dev

Repository files navigation

feedback.dev

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.

Structure

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

Local development

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 :3000

The api and web apps read .env from the repo root (dotenv) — or export the variables in your shell.

  1. Open http://localhost:3000, sign up. A project + API key is created automatically.
  2. Grab the key from Dashboard → Setup, paste it into examples/demo.html.
  3. Open the demo page, click Give feedback, submit — it appears in the inbox.
  4. Change colors/text in Dashboard → Design, reload the demo page.

Installing the widget on a site

<script src="https://YOUR-API.up.railway.app/widget.js" data-api-key="fbk_..." defer></script>
  • Add data-feedback-trigger to 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 /install on the dashboard domain for full instructions; llms.txt is also served.

Deploying

API + Postgres on Railway

  1. Create a Railway project with a Postgres service; note DATABASE_URL.
  2. Add a service from this repo. apps/api/railway.json builds the widget and the api; start command is node apps/api/dist/index.js.
  3. Set env: DATABASE_URL, NODE_ENV=production.
  4. 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), and NEXT_PUBLIC_API_URL (the deployed api URL, used in setup snippets).

Contributing

See CONTRIBUTING.md. Security issues: see SECURITY.md.

License

MIT

About

AI Native Feedback Form

Resources

License

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages