X Wrapped - Devpost Submission
Inspiration
We wanted to bring the viral "Spotify Wrapped" experience to Twitter/X. Everyone loves seeing their year in review as a shareable, cinematic piece of content—but there's no equivalent for your Twitter presence. We built X Wrapped to let anyone generate an AI-powered personality analysis and cinematic video from their tweet history.
What it does
X Wrapped takes any Twitter/X handle and generates:
- AI Personality Analysis — Uses OpenRouter to analyze tweet content and determine personality archetypes, top topics, sentiment, and mood
- Web Context Enrichment — Optionally uses Exa neural search to pull public context about the person
- Cinematic Video — Uses MagicHour's API to generate a shareable 5-second video based on the personality analysis
- Voiceover — Generates AI voiceover audio describing the personality
- Results Page — Displays the video, stats, and download/share options
All data is stored persistently in MongoDB Atlas.
How we built it
- SvelteKit + Svelte 5 — Modern reactive web framework with runes
- TypeScript — Full type safety
- TailwindCSS v4 — Dark-themed, mobile-first UI
- MongoDB Atlas — Persistent storage for wrapped jobs, profiles, and analysis results
- OpenRouter — Free AI model for personality archetype analysis
- MagicHour — Text-to-video and image-to-video generation
- Exa — Optional neural web search for public context
- twitterapi.io — Optional live tweet fetching
The pipeline orchestrates: scraping → analysis → video generation → storage → results display.
Challenges we ran into
SvelteKit deployment was the biggest challenge. Getting the app production-ready required careful configuration for:
- Environment variable handling between server and client
- MongoDB connection management in a serverless-style deployment
- Proper handling of async job processing
- Video generation polling and webhook handling
We also had to work around MagicHour's prompt length limits (2000 chars), handle profile image uploads from Twitter's CDN, and gracefully fall back when APIs were unavailable.
Accomplishments that we're proud of
- Successfully integrating multiple APIs (OpenRouter, MagicHour, Exa, MongoDB) into a cohesive pipeline
- Building a responsive dark-mode UI that feels native to X
- Creating a robust fallback system so the app works even with minimal API keys
- Implementing video backfill so jobs can regenerate media after the fact
What we learned
- SvelteKit's deployment model requires careful planning for async server-side operations
- MongoDB is excellent for storing flexible job states with varying fields
- MagicHour's video generation works great for mood/palette-driven content but has prompt constraints
- Building for multiple API providers requires solid error handling and fallback logic
What's next for X Wrapped
- Add more video templates and styles
- Support for Instagram/TikTok handles
- Generate shareable image cards alongside video
- Add "year in review" metrics (tweet counts over time, engagement trends)
- Deploy to production with proper scaling for FalconHacks
Built With
- magichour
- mongodb
- sveltekit
Log in or sign up for Devpost to join the conversation.