Prompt Cookbook
Lovable Build — InboxFlow (Inbox Assistant)
Copy this prompt
PRODUCT InboxFlow is a demo-first inbox assistant that turns email into an actionable workflow: triage → label → task → done. This MVP uses a DEMO email dataset (no real inbox integration today). The goal is to prove the workflow before production complexity. NONNEGOTIABLES - Inbox loads from seeded demo data immediately (no auth) - Email rows are clickable → open Email Detail - Actions persist: archive, important, labels, tasks - Rules exist and apply on "Sync": if from/subject contains → label/mark important - End-to-end loop must work: Inbox → Detail → Action → Task/Rule → Sync → Updated state SCREENS 1) Demo Connect (simple start screen): Title "InboxFlow (Demo Inbox)"; Button "Load Demo Inbox"; one-liner "Prove the workflow before connecting real email."; after load, route to Inbox. 2) Inbox: list emails with sender, subject, snippet, date, isRead, isImportant, labels, archived status; Filters: All / Unread / Important / Labeled / Archived; clicking an email opens Email Detail; Buttons: "Sync", "Rules", "Tasks"; show "Last Sync: timestamp". 3) Email Detail: show full email (sender, subject, date, body); Actions: Mark Read/Unread; Mark Important; Add Label (dropdown + create new label); Archive / Unarchive; "Create Task from Email" (task title defaults to subject); Back button returns to Inbox with updated state. 4) Rules: create rule form (If FROM contains [text] OR SUBJECT contains [text]; Then add label [text] and/or mark important); list rules with enable/disable/delete; rules apply when user presses "Sync". 5) Tasks: task list created from emails; each task has title, linked email, status (open/done); clicking a task opens the linked email detail; mark task done (optional: archive linked email). DATA MODEL (simple) Email: id, from, subject, snippet, body, date, isRead, isImportant, labels[], isArchived Rule: id, isEnabled, fromContains, subjectContains, addLabel, markImportant Task: id, emailId, title, status(open/done), createdAt DEMO EMAIL DATASET Seed 25 demo emails across categories: Sales lead inquiry (3); Customer issue/support (5); Invoice/billing/finance (4); Meeting request/scheduling (4); Newsletter/marketing (5); Hiring/resume (2); Vendor/partnership (2). Each email must have realistic subject + snippet + body text. SYNC BEHAVIOR - "Sync" refreshes the inbox list and reapplies rules to all non-archived emails. - Do NOT wipe user actions; preserve labels/important/read/archive/task states. ACCEPTANCE TEST MUST PASS - Load Demo Inbox → Inbox renders 25 emails - Click an email → detail opens - Add label + mark important → visible back in Inbox - Archive an email → it moves to Archived filter - Create a task from an email → task appears in Tasks - Create rule (subject contains "Invoice" → label "Finance") → Sync → invoice emails get labeled - Open a saved task → routes to linked email detail