Inspiration
Every year, millions of Americans face the same Halloween dilemma: "What costume should I wear?" The process is overwhelming - endless scrolling through generic costume sites, budget constraints, lack of personalization, and uncertainty about whether to buy or DIY. We wanted to solve this decision fatigue by creating SpookFit, an AI-powered platform that makes finding your perfect Halloween costume as easy as taking a quick quiz.
Our inspiration came from recognizing that Halloween costume planning shouldn't be stressful - it should be fun, personalized, and accessible to everyone, regardless of budget or crafting skills.
What We Learned
This hackathon was an incredible learning experience:
- Advanced AI Prompt Engineering: We learned how to craft sophisticated, multi-stage prompts that generate highly personalized character-specific costume recommendations. Our AI system evolved from suggesting generic concepts like "superhero costume" to specific characters like "Miles Morales Spider-Man (Into the Spider-Verse)" with detailed iconic outfit descriptions.
- Data Architecture at Scale: We built and integrated a comprehensive costume database with over 1,200+ unique costumes across 15+ categories (Gaming, Anime, Movies/TV, Music Artists, Disney, Historical Figures, Sports, etc.), handling data corruption, deduplication, and seamless merging.
- Full-Stack AI Integration: We mastered implementing Lovable AI (Google Gemini 2.5 Flash) through Supabase Edge Functions, creating a hybrid recommendation engine that combines database matching with AI-generated creative suggestions.
- UX Psychology: We discovered the importance of context-specific feedback (different loading messages for costume generation vs. guide creation) and progressive disclosure (enhanced interest questions that dig deeper into user preferences).
How We Built It
Tech Stack
- Frontend: React + TypeScript with Shadcn/ui components
- Backend: Lovable Cloud (Supabase) with Edge Functions
- AI: Lovable AI Gateway (Google Gemini 2.5 Flash, GPT-5)
- Styling: Tailwind CSS with custom Halloween theme
Architecture
Our multi-stage AI pipeline powers the entire experience:
- Enhanced Onboarding Quiz (7 questions)
- Category-based interests with deep-dive follow-ups
- Budget preferences and DIY willingness
- Past costume history to avoid repetition
- General hobbies for creative connections
- Hybrid Recommendation Engine (
generate-hybridEdge Function)- Combines database matching with AI generation
- AI analyzes user profile against 1,200+ costume database
- Generates unique creative ideas not in database
- Provides 5 personalized suggestions with "Generate More" capability
- Costume Enhancement (
enhance-costumesEdge Function)- Enriches each suggestion with detailed descriptions
- Estimates cost, time, and difficulty
- Creates Google Images search queries for visual references
- Explains why each costume matches the user's profile
- Implementation Guides (
generate-guideEdge Function)- Buy Path: Itemized shopping list with estimated costs and purchase locations
- DIY Path: Step-by-step instructions with materials, tools, and pro tips
- Both paths generated on-demand when user selects a costume
Key Development Challenges
The biggest technical challenge was integrating a corrupted user-provided costume database (costume-database-3.js). The file had structural issues - misplaced export statements, incomplete arrays, and overlapping data. We solved this by:
- Systematically extracting data category by category
- Creating temporary reference files (
costume-database-raw.js,costumeDatabase-full.txt) - Merging with a second complete database while ensuring zero overlap
- Growing from ~135 to 1,200+ unique costumes
Challenges We Faced
- Data Corruption Recovery: Parsing and salvaging a malformed 1,200+ costume database required careful manual extraction and strategic data management.
- AI Specificity: Initial prompts generated generic suggestions. We refined prompts to focus on actual recognizable characters with detailed iconic outfit descriptions.
- Seamless UX: Balancing comprehensive features (quiz, results, guides) while maintaining smooth user flow and fast load times.
- API Key Management: Understanding the distinction between different AI providers (LOVABLE_API_KEY for Lovable's AI Gateway vs. other services) and secure secret handling in Supabase Edge Functions.
Built With
- gemini
- git
- github
- lovable
- react
- supabase
- typescript
Log in or sign up for Devpost to join the conversation.