Save this block to your file system
Add required npm packages
pnpm i ai @ai-sdk/google @ai-sdk/rsc @hookform/resolvers/zod react-hook-form zod lucide-react @upstash/ratelimit @upstash/redis recharts motion/react
Install shadcn/ui components
pnpm dlx shadcn@latest add button card form input textarea label badge sonner scroll-area chart
Set up AI-powered components
npx ai-elements@latest
Optional: Configure Upstash for Rate Limiting