Prompt:
Act as a world-class Frontend Engineer. Build a production-ready React application called "Winget". This is a no-code SaaS platform that allows e-commerce merchants to build branded "engagement games" (Spin-to-Win wheels and Scratch Cards) to capture leads and reduce cart abandonment.
Tech Stack:
- Framework: React (TypeScript)
- Styling: Tailwind CSS (Use a professional slate/indigo SaaS color palette)
- Icons: Lucide-React
- Charts: Recharts
- AI: @google/genai (Gemini Flash 2.5) for text generation.
Core Application Structure:
The app should have a Sidebar navigation with three main views:
- Dashboard: Analytics and overview.
- My Campaigns: Management of existing games.
- Settings: Store configuration and billing.
Detailed Feature Requirements:
1. Dashboard View:
- Display top-level metrics in cards: Total Impressions, Game Plays, Leads Captured, and Est. Revenue.
- Charts:
- A Line Chart showing "Engagement Trends" (Views vs Plays) over the last 7 days.
- A Bar Chart showing "Conversion by Game".
- Active Campaigns Table: A list showing Campaign Name, Type (Wheel/Scratch), Status (Active/Draft), Plays, and CTR (Click Through Rate).
2. My Campaigns View:
- Display a grid of cards for each campaign.