--- name: premium-experience version: 1.0.0 description: > Premium app generation that creates WOW-factor experiences. Multi-page apps with smooth animations, zero TypeScript errors, and production-ready quality. Lovable-style experience: one prompt, complete app, instant delight. MUST be used alongside vibe-orchestrator for new projects. triggers: - /toh-vibe (new projects) - /toh (complex app requests) - Any "create app" request --- # Premium Experience Skill > **"One prompt. Complete app. Instant WOW."** Transform any idea into a premium, production-ready application with multiple pages, smooth animations, and zero errors - all in a single prompt. --- ## ๐ŸŽฏ Core Philosophy ``` PREMIUM = COMPLETE + POLISHED + DELIGHTFUL User says: "Create expense tracker" โŒ Basic output: - 1 page - No animations - Basic styling - "Add more pages later" โœ… Premium output: - 5+ pages (Dashboard, Transactions, Reports, Settings, Auth) - Smooth page transitions - Micro-interactions everywhere - Loading skeletons - Empty states designed - Ready to use immediately ``` --- ## ๐Ÿ“ฑ Multi-Page Generation (MANDATORY!) ### Minimum Page Set by App Type Every new project MUST generate these pages based on app type: ```yaml saas-app: required_pages: - "/" (Landing/Marketing page) - "/dashboard" (Main dashboard) - "/[feature]" (Core feature page) - "/settings" (User settings) - "/auth/login" (Authentication) optional_pages: - "/auth/register" - "/auth/forgot-password" - "/profile" - "/pricing" - "/help" ecommerce: required_pages: - "/" (Homepage with hero + featured) - "/products" (Product listing) - "/products/[id]" (Product detail) - "/cart" (Shopping cart) - "/checkout" (Checkout flow) optional_pages: - "/auth/login" - "/orders" - "/wishlist" - "/search" ai-chatbot: required_pages: - "/" (Landing page) - "/chat" (Main chat interface) - "/chat/[id]" (Chat history) - "/settings" (Preferences) - "/auth/login" optional_pages: - "/prompts" (Saved prompts) - "/history" food-restaurant: required_pages: - "/" (Homepage with hero) - "/menu" (Full menu) - "/menu/[category]" (Category view) - "/cart" (Order cart) - "/checkout" (Order placement) optional_pages: - "/orders" (Order tracking) - "/locations" - "/about" education: required_pages: - "/" (Landing page) - "/courses" (Course listing) - "/courses/[id]" (Course detail) - "/learn/[id]" (Learning interface) - "/dashboard" (Progress dashboard) optional_pages: - "/certificates" - "/profile" - "/leaderboard" generic: required_pages: - "/" (Landing/Home) - "/dashboard" (Main interface) - "/[main-feature]" (Primary feature) - "/settings" (Settings) - "/auth/login" (Authentication) ``` ### Page Generation Order ``` 1. LAYOUT FIRST โ””โ”€โ”€ app/layout.tsx (with providers, fonts, metadata) โ””โ”€โ”€ components/layout/Navbar.tsx โ””โ”€โ”€ components/layout/Sidebar.tsx (if dashboard-style) โ””โ”€โ”€ components/layout/Footer.tsx (if marketing pages) 2. SHARED COMPONENTS โ””โ”€โ”€ components/ui/ (shadcn components) โ””โ”€โ”€ components/shared/ (app-specific shared) 3. FEATURE COMPONENTS โ””โ”€โ”€ components/features/[feature]/ (feature-specific) 4. PAGES (parallel if possible) โ””โ”€โ”€ app/page.tsx โ””โ”€โ”€ app/dashboard/page.tsx โ””โ”€โ”€ app/[feature]/page.tsx โ””โ”€โ”€ ...etc 5. AUTH PAGES (last) โ””โ”€โ”€ app/auth/login/page.tsx โ””โ”€โ”€ app/auth/register/page.tsx ``` --- ## โœจ Animation System (MANDATORY!) ### Required Animations Every premium app MUST have these animations: ```typescript // 1. PAGE TRANSITIONS // Every page should fade in smoothly // components/motion/PageTransition.tsx "use client"; import { motion } from "framer-motion"; import { ReactNode } from "react"; const pageVariants = { initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -20 }, }; export function PageTransition({ children }: { children: ReactNode }) { return ( {children} ); } ``` ```typescript // 2. STAGGERED LIST ANIMATIONS // Lists should animate in one by one // components/motion/StaggerContainer.tsx "use client"; import { motion } from "framer-motion"; import { ReactNode } from "react"; const containerVariants = { hidden: { opacity: 0 }, show: { opacity: 1, transition: { staggerChildren: 0.1, }, }, }; const itemVariants = { hidden: { opacity: 0, y: 20 }, show: { opacity: 1, y: 0 }, }; export function StaggerContainer({ children }: { children: ReactNode }) { return ( {children} ); } export function StaggerItem({ children }: { children: ReactNode }) { return {children}; } ``` ```typescript // 3. CARD HOVER EFFECTS // Cards should lift on hover // Usage in any card component {/* Card content */} ``` ```typescript // 4. BUTTON PRESS EFFECTS // Buttons should feel tactile // Usage on buttons {children} ``` ```typescript // 5. NUMBER COUNTING ANIMATION // Stats should count up // components/motion/CountUp.tsx "use client"; import { useEffect, useRef, useState } from "react"; import { useInView } from "framer-motion"; interface CountUpProps { end: number; duration?: number; prefix?: string; suffix?: string; } export function CountUp({ end, duration = 2, prefix = "", suffix = "" }: CountUpProps) { const [count, setCount] = useState(0); const ref = useRef(null); const isInView = useInView(ref, { once: true }); useEffect(() => { if (!isInView) return; let startTime: number; const animate = (timestamp: number) => { if (!startTime) startTime = timestamp; const progress = Math.min((timestamp - startTime) / (duration * 1000), 1); setCount(Math.floor(progress * end)); if (progress < 1) requestAnimationFrame(animate); }; requestAnimationFrame(animate); }, [isInView, end, duration]); return {prefix}{count.toLocaleString()}{suffix}; } ``` ### Animation Timing Guidelines ```css /* Standard timings */ --duration-fast: 150ms; /* Micro-interactions */ --duration-normal: 200ms; /* Button/hover states */ --duration-slow: 300ms; /* Page transitions */ --duration-slower: 500ms; /* Complex animations */ /* Easing functions */ --ease-out: cubic-bezier(0.33, 1, 0.68, 1); /* Most animations */ --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1); /* Symmetric motion */ --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1); /* Playful bounce */ ``` ### Animation Rules ``` DO: โœ… Use subtle animations (y: 20 max, scale: 1.02 max) โœ… Keep durations short (150-300ms) โœ… Use ease-out for most animations โœ… Animate on scroll (useInView) โœ… Stagger lists (100ms between items) DON'T: โŒ Bounce animations (too playful) โŒ Long durations (>500ms feels slow) โŒ Large movements (y: 100+ is jarring) โŒ Animate everything (be selective) โŒ Block interaction during animation ``` --- ## ๐ŸŽจ Premium UI Components ### Required Shared Components Every premium app MUST have these components: ``` components/ โ”œโ”€โ”€ layout/ โ”‚ โ”œโ”€โ”€ Navbar.tsx # Responsive navigation โ”‚ โ”œโ”€โ”€ Sidebar.tsx # Dashboard sidebar (if applicable) โ”‚ โ”œโ”€โ”€ Footer.tsx # Marketing footer (if applicable) โ”‚ โ””โ”€โ”€ MobileMenu.tsx # Mobile navigation drawer โ”‚ โ”œโ”€โ”€ motion/ โ”‚ โ”œโ”€โ”€ PageTransition.tsx # Page fade-in โ”‚ โ”œโ”€โ”€ StaggerContainer.tsx # List animations โ”‚ โ”œโ”€โ”€ FadeIn.tsx # Simple fade-in wrapper โ”‚ โ””โ”€โ”€ CountUp.tsx # Number animation โ”‚ โ”œโ”€โ”€ feedback/ โ”‚ โ”œโ”€โ”€ LoadingSpinner.tsx # Generic loading โ”‚ โ”œโ”€โ”€ Skeleton.tsx # Content skeleton โ”‚ โ”œโ”€โ”€ EmptyState.tsx # Empty state with illustration โ”‚ โ””โ”€โ”€ ErrorBoundary.tsx # Error fallback โ”‚ โ”œโ”€โ”€ shared/ โ”‚ โ”œโ”€โ”€ Logo.tsx # Brand logo โ”‚ โ”œโ”€โ”€ Avatar.tsx # User avatar with fallback โ”‚ โ”œโ”€โ”€ Badge.tsx # Status badges โ”‚ โ””โ”€โ”€ SearchInput.tsx # Global search (if applicable) โ”‚ โ””โ”€โ”€ ui/ # shadcn/ui components โ””โ”€โ”€ (generated by shadcn) ``` ### Loading State Pattern ```typescript // EVERY page should have loading state // app/dashboard/loading.tsx import { Skeleton } from "@/components/ui/skeleton"; export default function DashboardLoading() { return (
{/* Stats skeleton */}
{[...Array(4)].map((_, i) => ( ))}
{/* Chart skeleton */} {/* Table skeleton */}
{[...Array(5)].map((_, i) => ( ))}
); } ``` ### Empty State Pattern ```typescript // components/feedback/EmptyState.tsx import { LucideIcon } from "lucide-react"; import { Button } from "@/components/ui/button"; interface EmptyStateProps { icon: LucideIcon; title: string; description: string; actionLabel?: string; onAction?: () => void; } export function EmptyState({ icon: Icon, title, description, actionLabel, onAction, }: EmptyStateProps) { return (

{title}

{description}

{actionLabel && onAction && ( )}
); } ``` --- ## ๐Ÿ›ก๏ธ Zero Error Guarantee ### TypeScript Strict Rules ```typescript // tsconfig.json MUST have these { "compilerOptions": { "strict": true, "noImplicitAny": true, "strictNullChecks": true, "noUnusedLocals": true, "noUnusedParameters": true } } ``` ### Pre-Generation Checklist Before generating ANY code, verify: ``` โ–ก All imports are valid (no typos) โ–ก All types are defined โ–ก All props have types โ–ก No `any` type used โ–ก All async functions have error handling โ–ก All optional chaining where needed (?.) โ–ก All nullish coalescing where needed (??) โ–ก All arrays initialized before use โ–ก All state has initial values ``` ### Common Error Prevention Patterns ```typescript // โŒ BAD: Will error if data is undefined {data.items.map(item => ...)} // โœ… GOOD: Safe with fallback {(data?.items ?? []).map(item => ...)} ``` ```typescript // โŒ BAD: Type error on undefined function UserCard({ user }) { ... } // โœ… GOOD: Proper typing interface UserCardProps { user: User; } function UserCard({ user }: UserCardProps) { ... } ``` ```typescript // โŒ BAD: Unhandled async const data = await fetch(...); // โœ… GOOD: With error handling try { const data = await fetch(...); if (!data.ok) throw new Error('Failed to fetch'); return data.json(); } catch (error) { console.error('Fetch error:', error); return null; } ``` ### Required Type Definitions Every project MUST have: ```typescript // types/index.ts export interface User { id: string; name: string; email: string; avatar?: string; createdAt: Date; } // types/[feature].ts export interface [Feature] { id: string; // ... feature-specific fields createdAt: Date; updatedAt: Date; } // types/api.ts export interface ApiResponse { data: T; error?: string; message?: string; } export interface PaginatedResponse { data: T[]; total: number; page: number; pageSize: number; hasMore: boolean; } ``` --- ## ๐ŸŽ WOW Factor Elements ### Must-Have WOW Features ```yaml hero_section: - Gradient text on heading (subtle) - Animated background elements (floating shapes) - CTA button with hover glow - Stats with count-up animation dashboard: - Animated stat cards (stagger in) - Charts with loading animation - Real-time indicators (pulsing dot) - Smooth tab transitions lists: - Staggered item appearance - Hover lift effect on cards - Smooth reorder animation (drag/drop) - Pull-to-refresh indicator (mobile) forms: - Input focus animations - Real-time validation feedback - Submit button loading state - Success confetti (optional) navigation: - Active state indicator animation - Mobile menu slide-in - Breadcrumb transitions - Search expand animation ``` ### Premium Design Details ```yaml shadows: cards: "shadow-sm hover:shadow-lg transition-shadow" modals: "shadow-2xl" dropdowns: "shadow-lg" borders: cards: "border border-border/50" inputs: "border border-input focus:ring-2 focus:ring-primary/20" backgrounds: page: "bg-background" card: "bg-card" muted: "bg-muted/50" gradient: "bg-gradient-to-br from-primary/10 via-background to-secondary/10" hover_states: cards: "hover:border-primary/50 transition-colors" buttons: "hover:brightness-110 transition-all" links: "hover:text-primary transition-colors" ``` --- ## ๐Ÿ“‹ Pre-Delivery Verification ### Final Checklist (MANDATORY!) Before delivering to user, verify ALL: ``` BUILD CHECK: โ–ก `npm run build` passes with 0 errors โ–ก `npm run lint` passes with 0 warnings โ–ก All pages render without errors PAGES CHECK (minimum 5): โ–ก Homepage/Landing created โ–ก Main feature page created โ–ก Dashboard/Detail page created โ–ก Settings page created โ–ก Auth page created (at least login) ANIMATION CHECK: โ–ก Page transitions working โ–ก List animations working โ–ก Card hover effects working โ–ก Button press feedback working โ–ก Loading states animated RESPONSIVE CHECK: โ–ก Mobile layout works (320px+) โ–ก Tablet layout works (768px+) โ–ก Desktop layout works (1024px+) โ–ก No horizontal scroll QUALITY CHECK: โ–ก No TypeScript errors โ–ก No console errors โ–ก No missing images (use placeholders) โ–ก No broken links โ–ก Loading states present โ–ก Empty states designed ``` --- ## ๐Ÿš€ Quick Start Template When starting a new project, use this structure: ``` project/ โ”œโ”€โ”€ app/ โ”‚ โ”œโ”€โ”€ layout.tsx # Root layout with providers โ”‚ โ”œโ”€โ”€ page.tsx # Landing/Home โ”‚ โ”œโ”€โ”€ loading.tsx # Global loading โ”‚ โ”œโ”€โ”€ error.tsx # Global error โ”‚ โ”œโ”€โ”€ not-found.tsx # 404 page โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ dashboard/ โ”‚ โ”‚ โ”œโ”€โ”€ page.tsx # Dashboard โ”‚ โ”‚ โ””โ”€โ”€ loading.tsx # Dashboard skeleton โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ [feature]/ โ”‚ โ”‚ โ”œโ”€โ”€ page.tsx # Feature list โ”‚ โ”‚ โ”œโ”€โ”€ [id]/page.tsx # Feature detail โ”‚ โ”‚ โ””โ”€โ”€ loading.tsx # Feature skeleton โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ settings/ โ”‚ โ”‚ โ””โ”€โ”€ page.tsx # Settings โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ auth/ โ”‚ โ”œโ”€โ”€ login/page.tsx # Login โ”‚ โ””โ”€โ”€ register/page.tsx # Register โ”‚ โ”œโ”€โ”€ components/ โ”‚ โ”œโ”€โ”€ layout/ # Layout components โ”‚ โ”œโ”€โ”€ motion/ # Animation components โ”‚ โ”œโ”€โ”€ feedback/ # Loading, empty, error states โ”‚ โ”œโ”€โ”€ features/ # Feature-specific components โ”‚ โ”œโ”€โ”€ shared/ # Shared components โ”‚ โ””โ”€โ”€ ui/ # shadcn/ui โ”‚ โ”œโ”€โ”€ lib/ โ”‚ โ”œโ”€โ”€ utils.ts # Utility functions โ”‚ โ””โ”€โ”€ mock-data.ts # Realistic mock data โ”‚ โ”œโ”€โ”€ stores/ โ”‚ โ””โ”€โ”€ use-[feature].ts # Zustand stores โ”‚ โ”œโ”€โ”€ types/ โ”‚ โ”œโ”€โ”€ index.ts # Shared types โ”‚ โ””โ”€โ”€ [feature].ts # Feature types โ”‚ โ””โ”€โ”€ providers/ โ””โ”€โ”€ providers.tsx # All providers wrapped ``` --- ## ๐ŸŒ Internationalization Note All code, comments, and documentation should be in **English**. Only user-facing content (mock data, UI text) should match the user's language: ```typescript // Code: Always English interface ProductCardProps { product: Product; } // Mock data: Match user language const mockProducts = [ // Thai user { name: "เธเธฒเนเธŸเธฅเธฒเน€เธ•เน‰", price: 65 }, // English user { name: "Caffe Latte", price: 65 }, ]; ``` --- *Premium Experience Skill v1.0.0 - One Prompt, Complete App, Instant WOW*