# Lovable Prompts for Building a Feedback Collection Tool

- Tool: Lovable Prompts
- Last updated: June 2026

## TL;DR

This prompt kit builds a Canny-style feedback tool: an embeddable widget, an OpenAI edge function that scores sentiment and extracts a topic label, an admin inbox sortable by sentiment, and a public roadmap. The entire build fits Lovable Free. The single biggest risk is the OpenAI API key — it must live in Cloud → Secrets, never in a VITE_ variable or any /src/ file, or it gets scraped from your JS bundle and billed to your card.

## Frequently asked questions

### Where exactly does my OpenAI API key go — and where should it never go?

The only correct location is Cloud → Secrets (click the + icon → Cloud tab → Secrets → add OPENAI_API_KEY). Inside the edge function, access it with Deno.env.get('OPENAI_API_KEY'). It should never appear in: any file inside /src/, any VITE_ environment variable, the .env file at project root, or any client-side config. Any VITE_ prefix bakes the value into your production JavaScript bundle, where it is readable by anyone who opens DevTools. Bots scan production bundles for 'sk-' strings constantly — a leaked OpenAI key typically racks up $100+ in charges within 6 hours.

### Can users submit feedback anonymously without an account?

Yes. The feedback table has an anon INSERT RLS policy with a text-length check, so any visitor can submit without creating an account. The submitter_email and submitter_name fields are optional — useful if you want to follow up but not required. If you want to gate submission to signed-in users only (for compliance or to reduce spam), change the INSERT policy to authenticated only and remove the anon policy.

### Why is OpenAI sentiment scoring server-side instead of client-side?

Three reasons. First, security: the API key would be in your JavaScript bundle client-side and readable by anyone, leading to key theft and charges on your card. Second, reliability: server-side calls can retry on failure, run asynchronously without blocking the UI, and write results back to the database independently of the browser session. Third, cost control: server-side calls go through a single endpoint where you can rate-limit, cap, and monitor usage — client-side calls give every visitor direct access to your API key's spending limit.

### How accurate is gpt-5.4-mini for sentiment scoring compared to a fine-tuned model?

For broad categories (positive / neutral / negative / urgent), gpt-5.4-mini is accurate enough for product feedback — typically 85-90% agreement with human annotation on customer feedback data. It struggles with sarcasm ('great, another bug') and very short inputs ('no'). For most feedback tools, the 3-word topic label is more useful than the sentiment score anyway — it lets you cluster feedback by theme without reading every item. If you need higher accuracy for high-stakes decisions (legal, medical, financial), consider Claude Sonnet 4.6 at slightly higher cost or a fine-tuned classifier.

### Can I migrate from Canny to this Lovable build?

Yes, with manual data migration. Export your Canny data as CSV (Canny supports CSV export from the board settings). Transform the CSV to match the feedback table schema (text, status, votes). Import via Supabase's bulk insert: upload the CSV to a temporary table in SQL Editor, then INSERT INTO feedback SELECT ... FROM temp_table. The status mapping: Canny's 'Under Review' → 'reviewing', 'Planned' → 'planned', 'In Progress' → 'in_progress', 'Complete' → 'shipped'. Historical votes are harder — Canny does not export individual voter data, so you will lose the per-user vote attribution and only keep counts.

### How do upvotes work and why do they need authenticated users?

Upvotes are stored in the votes table with a unique (feedback_id, user_id) constraint, so each user can upvote a feedback item exactly once. Requiring authentication is necessary for this deduplication to be meaningful — anonymous upvotes would be trivially ballot-stuffable by refreshing the page or using a VPN. When a user upvotes, the edge function or RPC atomically increments feedback.upvotes and inserts a vote row. The UI reads the upvotes count from the feedback row directly (not by counting vote rows) for performance.

### What is the monthly OpenAI cost at different feedback volumes?

gpt-5.4-mini pricing is approximately $0.75 per million input tokens and $4.50 per million output tokens. Each feedback analysis request uses roughly 150 input tokens (the feedback text + system prompt) and 50 output tokens (the JSON response). That is about $0.0004 per feedback item, or roughly $0.40 per 1,000 feedback items. At 1K feedback/mo: $0.40. At 10K/mo: $4. At 100K/mo: $40. Set a usage cap in OpenAI dashboard to bound costs; $10-20/mo cap is appropriate for most indie tools.

### If your feedback tool needs CRM sync, multi-product boards, or enterprise compliance, what does RapidDev offer?

If your build outgrows this prompt kit and you need custom architecture, RapidDev builds production-grade Lovable apps at $13K-$25K — book a free 30-minute consultation at rapidevelopers.com.

---

Source: https://www.rapidevelopers.com/lovable-prompts/lovable-prompts-for-building-feedback-collection-tool
© RapidDev — https://www.rapidevelopers.com/lovable-prompts/lovable-prompts-for-building-feedback-collection-tool
