Insightflare is a feedback intelligence dashboard built on Cloudflare. It aggregates incoming feedback, classifies urgency with Workers AI, stores results in D1, and presents a clean UI for triage and trend spotting.
- Cloudflare Workers: Serves the API and hosts the frontend build.
- D1: Primary storage for feedback entries.
- Workflows: Durable pipeline to ingest, classify, and store feedback.
- Workers AI: Urgency classification on ingest + sentiment analysis in the modal.
- Vite + React: Frontend UI (search, triage lists, modal).
- Ingest:
POST /api/ingestorPOST /api/ingest/mock - Workflow:
FeedbackIngestWorkflowruns:- classify urgency (Workers AI, fallback heuristic)
- insert into D1
- UI refresh:
GET /api/updateschecks for new dataGET /api/feedbackfetches the latest entries
- Modal sentiment:
GET /api/sentiment?id=...runs Workers AI sentiment analysis
GET /api/feedback→ list feedback entriesGET /api/updates→ latestcreated_attimestampPOST /api/ingest→ ingest a real payloadPOST /api/ingest/mock→ generate a mock entry with Workers AIGET /api/sentiment?id=...→ sentiment analysis for a given entry
npm install
npm run devIn another terminal, run the Worker:
npx wrangler dev --remoteNote: --remote is recommended so Workers AI runs against your account.
Apply migrations locally:
npx wrangler d1 migrations apply feedback-dashboard-db --localApply migrations remotely:
npx wrangler d1 migrations apply feedback-dashboard-db --remotenpm run build
npx wrangler deployworker/index.ts— API routes + workflow triggersworker/workflows/feedback_ingest.ts— ingestion workflowmigrations/*.sql— D1 schema + seed datasrc/App.tsx— UIwrangler.jsonc— bindings (D1, AI, Workflows)
- Workers AI binding is configured in
wrangler.jsoncunder"ai". - The AI model is set via
AI_MODELinwrangler.jsonc. - The search box filters by
titleordetailon the client.