xiaohongshu
xiaohongshu
copilotkit-pitch-deck
Production-ready CopilotKit pitch deck wizard in main application. Use when enhancing AI conversation features, optimizing Edge Function integration, debugging chat interface, or improving pitch deck generation flow. System is PRODUCTION READY (98/100).
Full skill instructions
Maintain and enhance the production-ready CopilotKit pitch deck wizard in the main Medellin Spark application. Uses CopilotKit Cloud API + Supabase Edge Functions (NOT LangGraph three-tier architecture).
Current Production Setup:
Frontend (:8080) --> Supabase Edge Functions --> OpenAI API
React 19 + Vite Deno Runtime (cloud) GPT-4o-mini
Key Components:
src/pages/PitchDeckWizard.tsx - CopilotKit v1.10.6 with chat interfacesupabase/functions/ - pitch-deck-assistant, generate-pitch-deck, chatTracker: /home/sk/template-copilot-kit-py/mvp-plan/progress/00-PRODUCTION-READINESS-TRACKER.md
Latest Validation: /home/sk/template-copilot-kit-py/mvp-plan/progress/01-FINAL-PRODUCTION-VALIDATION.md
CopilotKit Integration (src/pages/PitchDeckWizard.tsx:189-192):
<CopilotKit
publicApiKey={import.meta.env.VITE_COPILOT_CLOUD_PUBLIC_API_KEY}
showDevConsole={import.meta.env.DEV}
>
{/* Chat interface and wizard content */}
</CopilotKit>
Edge Functions (All ACTIVE):
Features Working ✅:
Build Performance:
Build Time: 4.71s ✅ (Target: <5s)
Bundle Size: 554KB ✅ (50% reduction from 1,109KB)
Gzip: 151KB ✅ (73% compression)
Warnings: 0 ✅
Production Quality:
TypeScript Errors: 0 ✅
Linter Warnings: 0 ✅
Routes Working: 24/24 ✅
Security Score: 100% ✅
Overall Score: 98/100 ✅
Cause: Edge Function connection issue Check:
# Verify Edge Functions deployed
supabase functions list
# Check function logs
supabase functions logs pitch-deck-assistant --tail
Fix: Ensure all Edge Functions deployed and ACTIVE
Cause: Missing or invalid OpenAI API key in Edge Function Check: Edge Function secrets
# View secrets (won't show values)
supabase secrets list
# Set OpenAI key if missing
supabase secrets set OPENAI_API_KEY=sk-...
Fix: Ensure OPENAI_API_KEY set as Supabase secret
Cause: Edge Function not returning completeness data Check: Browser console for response data Debug:
// In PitchDeckWizard.tsx - check response structure
console.log('Response from Edge Function:', response);
// Should include: { completeness: number, ... }
Cause: TypeScript errors or missing dependencies Check:
# Type check
pnpm tsc --noEmit
# Check for missing dependencies
pnpm install
Fix: Resolve TypeScript errors before building
Cause: Port conflicts or build cache Fix:
# Kill any processes on port 8080
lsof -ti :8080 | xargs kill -9
# Clear Vite cache
rm -rf node_modules/.vite
# Restart dev server
pnpm dev
cd /home/sk/template-copilot-kit-py
pnpm dev
Expected:
VITE v7.x ready in 234 ms
➜ Local: http://localhost:8080/
URL: http://localhost:8080/pitch-deck-wizard
Check:
/presentations/{id}/outline# Build for production
pnpm build
# Should complete in <5s with 0 warnings
# Check output for bundle sizes
src/pages/PitchDeckWizard.tsx - CopilotKit integration and chat interfacesrc/lib/apiClient.ts - Edge Function API callspackage.json - Dependencies and build scriptsvite.config.ts - Build configuration (optimized with code splitting)supabase/functions/chat/index.ts - OpenAI proxy (v16)supabase/functions/pitch-deck-assistant/index.ts - Conversation handler (v26)supabase/functions/generate-pitch-deck/index.ts - Deck generator (v28)supabase/functions/agent-example/index.ts - Agent SDK demo (v8)supabase/migrations/ - Database schema migrationsCLAUDE.md - Project standards and best practicesmvp-plan/progress/00-PRODUCTION-READINESS-TRACKER.md - Production statusmvp-plan/progress/01-FINAL-PRODUCTION-VALIDATION.md - Latest validationSITEMAP-2.md - Complete route mappnpm tsc --noEmit)pnpm lint)supabase functions logsStart Development:
cd /home/sk/template-copilot-kit-py
pnpm dev # Runs on http://localhost:8080
Type Check:
pnpm tsc --noEmit # Should return 0 errors
Production Build:
pnpm build # Should complete in <5s with 0 warnings
Deploy Edge Functions:
# Deploy single function
supabase functions deploy chat
# List all functions
supabase functions list
# View logs
supabase functions logs pitch-deck-assistant --tail
Database Commands:
# Push migrations
npx supabase db push
# Check status
supabase status
Frontend (package.json):
@copilotkit/react-core ^1.10.6 - CopilotKit SDK@copilotkit/react-ui ^1.10.6 - Chat interfacereact ^19.xvite ^7.x@supabase/supabase-js - Supabase clientEdge Functions (Deno runtime):
Required in .env:
# CopilotKit (frontend)
VITE_COPILOT_CLOUD_PUBLIC_API_KEY=your_public_key
# Supabase (frontend)
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your_anon_key
# Edge Functions (Supabase secrets)
OPENAI_API_KEY=sk-... # Set via: supabase secrets set
✅ Implemented:
🟡 Optional Enhancements:
/home/sk/template-copilot-kit-py/CLAUDE.md/home/sk/template-copilot-kit-py/mvp-plan/progress/This skill provides complete guidance for the production-ready CopilotKit pitch deck wizard in the main Medellin Spark application.
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience