DreamWeen – Where Your Dreams Come Alive

Inspiration

Every night, our minds create entire universes—vivid stories, impossible landscapes, characters we've never met, emotions we can't quite name. But the moment we wake up, these worlds fade away like morning fog. We forget the details, lose the emotions, and within hours, our dreams become nothing more than vague memories.

What if we could preserve these invisible universes?

That question sparked DreamWeen. I wanted to build something that captures the ephemeral nature of dreams and transforms them into persistent visual memories. Not just text descriptions, but actual cinematic videos that let you relive your dreams as if you're stepping back into your subconscious.

Why Dreams Are Perfect for Costume Contest

Dreams are inherently haunting, mysterious, and surreal—the perfect subject matter for a spooky, polished interface. Think about it:

  • Dreams are naturally eerie: Familiar places become strange, logic breaks down, impossible things happen
  • Dreams evoke mystery: They're messages from our subconscious we can't fully understand
  • Dreams are ethereal: They exist between reality and imagination, consciousness and unconsciousness
  • Dreams are personal yet universal: Everyone dreams, but each dream is uniquely haunting

The world of dreams is already spooky—shadowy figures, distorted realities, emotions that linger after waking. Building an app about dreams meant I could create an interface that's not just aesthetically haunting, but functionally haunting—where the spooky design elements enhance the core experience of exploring your subconscious.

The inspiration came from a personal experience: I had a vivid dream about flying over a neon-lit city with purple skies. When I woke up, I tried to sketch it, but my drawing skills couldn't capture what I saw. I wished I could just describe it and have AI recreate the visuals. That's when I realized—with today's AI technology (Gemini, Veo, OpenAI), this is actually possible.

DreamWeen is my answer to that wish. It's a platform where anyone can capture their dreams through text or voice, and watch as AI transforms them into immersive cinematic videos. The interface itself feels like a dream—mysterious, beautiful, slightly unsettling, and impossible to forget.

What it does

DreamWeen is an AI-powered dream visualization platform that transforms your sleep dreams into cinematic videos. Here's the complete journey:

1. Multi-Modal Dream Capture

  • Text Input: Type your dream description directly
  • Voice Recording: Record up to 10 minutes of audio describing your dream (perfect for capturing details right after waking up)
  • Auto-Transcription: Voice recordings are automatically transcribed using OpenAI's gpt-4o-transcribe
  • Reference Images: Upload up to 3 images to guide the visual style (e.g., a photo of yourself, a location, an art style)

2. AI-Powered Dream Analysis

Using Google Gemini 2.5 Pro, DreamWeen automatically:

  • Extracts 3-7 distinct scenes from your dream narrative
  • Identifies emotions present in the dream
  • Recognizes characters, locations, and themes
  • Creates structured metadata for searchability

3. Visual Generation Pipeline

  • Image Generation: Gemini 2.5 Flash Image (Nano Banana) creates key frames for each scene
  • Style Consistency: Uses previous frames as reference to maintain visual coherence
  • Character Consistency: Reference images ensure characters look the same across scenes

4. Cinematic Video Creation

  • Video Generation: Google Veo 3.1 creates 5-8 second video clips using frame interpolation
  • Smooth Transitions: Each scene flows naturally into the next
  • Video Concatenation: FFmpeg combines all clips into a final dream video (up to 60 seconds)

5. Dream Gallery & Calendar

  • Gallery View: Browse all your dreams with video thumbnails
  • Advanced Search: Filter by emotions, themes, characters, locations, or text
  • Calendar View: See your dreams organized by date with a visual timeline
  • Video Playback: Immersive full-screen player with glassmorphism design

6. Multi-User Platform (Production)

  • Authentication: Secure JWT-based login system
  • Personal Library: Each user has their own private dream collection
  • Cloud Storage: All media stored securely in Amazon S3

7. Real-Time Processing

  • Live Progress Tracking: Watch as your dream is analyzed, images are generated, and videos are created
  • Notifications: Get notified when your dream video is ready
  • Cross-Device Sync: Start on mobile, finish on desktop

8. Multi-Language Support

Supports 9 languages: English, French, Spanish, Portuguese (PT-PT & PT-BR), German, Italian, Japanese, Chinese (Simplified)


Why DreamWeen Is Perfect for Costume Contest

The Costume Contest category asks for "a haunting user interface that's polished and unforgettable, bringing in spooky design elements that enhance your app's function."

DreamWeen is the perfect embodiment of this because:

1. Dreams Are Inherently Haunting

  • Dreams exist in the twilight zone between consciousness and unconsciousness
  • They're surreal and mysterious—familiar things become strange, logic breaks down
  • They're ephemeral like ghosts—they fade the moment you wake up
  • They're personal yet universal—everyone has them, but they're uniquely yours
  • They contain emotions that linger—fear, wonder, confusion, joy

2. The Subject Matter Demands a Spooky Aesthetic

You can't build a dream app with a bright, cheerful interface—it would be tonally wrong. Dreams happen:

  • In the dark (nighttime, closed eyes)
  • In the subconscious (the mysterious depths of the mind)
  • In the liminal space (between sleep and waking)
  • With distorted reality (things that shouldn't exist, do)

The haunting UI isn't a design choice—it's a functional requirement. The interface must feel like a dream to properly serve its purpose.

3. Every Spooky Element Enhances Function

  • Dark theme → Dreams happen in darkness, the subconscious is unknown
  • Glassmorphism → Dreams are hazy, memories blur at the edges
  • Purple/indigo palette → The colors of twilight, dusk, the liminal hours
  • Fog effects → Memory is foggy, dreams are atmospheric
  • Glowing elements → Some dream fragments glow brighter in memory
  • Smooth animations → Dreams morph and shift, they don't cut abruptly
  • Mysterious atmosphere → The subconscious is a mysterious place

4. The Experience Is Immersive and Unforgettable

When you use DreamWeen, you're not just using an app—you're entering a portal to the dream world. The interface:

  • Feels ethereal and otherworldly
  • Creates an emotional connection to your subconscious
  • Makes you feel like you're stepping into a dream
  • Is polished and professional while being haunting
  • Is memorable because it matches the mysterious nature of dreams

5. Dreams Are Universal Yet Personal

Everyone dreams, making this a universally relatable experience. But each dream is unique, making it deeply personal. The haunting aesthetic creates:

  • A sense of mystery (what will your dream reveal?)
  • A sense of wonder (the impossible made visible)
  • A sense of nostalgia (dreams we've forgotten)
  • A sense of discovery (exploring your subconscious)

In short: DreamWeen doesn't just have a spooky UI—it's an app about something inherently spooky (dreams), where every haunting design element serves the function of creating an immersive portal to the mysterious world of the subconscious.


How we built it

I build it using Kiro. Here's how Kiro made it possible:

The Costume Contest Stack

11 Different Technologies Integrated:

  1. Google Gemini 2.5 Pro (text analysis)
  2. Google Gemini Nano Banana (image generation)
  3. Google Veo 3.1 (video generation)
  4. OpenAI gpt-4o-transcribe (speech-to-text)
  5. FastAPI (async Python web framework)
  6. MySQL (relational database via AWS RDS)
  7. Amazon S3 (object storage)
  8. FFmpeg (video processing)
  9. JWT (authentication)
  10. Docker (containerization)
  11. AWS EC2

Development Approach with Kiro

1. Spec-Driven Development

I started by creating comprehensive specifications with Kiro:

  • POC Spec: 12 requirements, 60+ acceptance criteria, 28 implementation tasks
  • Production Spec: 6 functional + 5 non-functional requirements, 42 tasks across 7 phases

Kiro helped break down the massive project into manageable chunks and tracked progress in real-time.

2. Steering Documents

Created three steering docs that guided Kiro throughout development:

  • product.md - Design philosophy (dreamlike, hypnotic, immersive aesthetic)
  • tech.md - Technology stack and async/await patterns
  • structure.md - Project organization and architecture

These ensured every component Kiro generated followed consistent patterns and design principles.

3. Agent Hooks for Automation

Set up 3 agent hooks that automated repetitive tasks:

  • Documentation Sync Monitor: Auto-updated docs when code changed
  • Translation Generator: Created translation files for 9 languages automatically
  • Source Change Monitor: Kept architecture docs synchronized

Result: 50+ automatic documentation updates, 9 language files generated in minutes.

4. MCP Servers for Extended Capabilities

Configured 5 MCP servers:

  • fetch: Research AI API documentation
  • chrome-devtools: Browser automation for testing
  • strands-agents: AWS Strands Agents documentation
  • aws-docs: AWS infrastructure guides
  • aws-api: Direct AWS CLI execution

These extended Kiro's capabilities, allowing infrastructure setup, testing, and research without leaving the IDE.

5. Vibe Coding for Rapid Development

Used natural language to describe features, and Kiro generated production-ready code:

  • "Create a JWT authentication system" → 5 complete files in 10 minutes
  • "Migrate from JSON to MySQL + S3" → Complete refactoring in 30 minutes
  • "Add quota management (10 dreams/month)" → Full feature in 10 minutes

Technical Architecture

Backend (Python 3.11 + FastAPI):

routes/ → services/ → clients/ → models/
  ↓         ↓           ↓         ↓
API     Business    AI APIs   Data Models

Frontend (Jinja2 + Vanilla JS):

  • Server-side rendering with Jinja2 templates
  • TailwindCSS for styling
  • Modular JavaScript (dream-api.js, notifications.js, gallery.js, calendar.js)
  • Glassmorphism design with purple/indigo palette

Storage:

  • MySQL (RDS) for metadata (users, dreams, scenes, quotas)
  • S3 for media files (images, videos, audio)
  • Signed URLs for secure access (1-hour expiry)

Processing Pipeline:

User Input → Transcription → Scene Extraction → Emotion Analysis
    ↓
Image Generation (parallel) → Video Generation (sequential) → Concatenation
    ↓
S3 Upload → Database Update → User Notification

Deployment:

  • Docker container (python:3.11-slim + ffmpeg)
  • AWS App Runner (auto-scaling)
  • VPC connector for RDS access
  • Secrets Manager for credentials

Challenges we ran into

1. Async/Sync Boundary with FFmpeg

Challenge: FFmpeg is synchronous, but the entire application is async. Running FFmpeg blocked the event loop, making the server unresponsive during video processing.

Solution: Used asyncio.to_thread() to run FFmpeg in a thread pool:

await asyncio.to_thread(
    subprocess.run,
    ['ffmpeg', '-f', 'concat', '-i', concat_file, output_path],
    check=True
)

2. Video Generation Timeouts

Challenge: Google Veo 3.1 video generation can take 2-5 minutes per scene. With 5-7 scenes, this meant 10-35 minutes of processing. Users would close the browser and lose progress.

Solution: Implemented a robust background processing system:

  • FastAPI BackgroundTasks for async processing
  • Database-backed progress tracking
  • Polling endpoint for real-time updates
  • Server-side notifications (not localStorage)
  • Resume capability if user closes browser

3. S3 Signed URL Security

Challenge: S3 bucket must be private, but users need to access their videos. Storing permanent URLs would expose media to anyone with the link.

Solution: Generate signed URLs on-demand with 1-hour expiry:

async def get_dream_video(dream_id: str, user: User):
    dream = await storage_service.load_dream(dream_id)
    if dream.user_id != user.id:
        raise HTTPException(403, "Not your dream")

    # Generate signed URL valid for 1 hour
    signed_url = await s3_service.generate_signed_url(
        dream.final_video_url, expiry=3600
    )
    return {"video_url": signed_url}

4. Notification Persistence Across Devices

Challenge: Initially used localStorage for notifications, but this doesn't sync across devices. Users would start a dream on mobile and not see progress on desktop.

Solution: Moved notifications to server-side:

  • Created GET /api/dreams/in-progress endpoint
  • Frontend loads notifications from API on page load
  • Polling updates every 2 seconds
  • Works across all devices and browsers

5. Route Ordering Bug

Challenge: Gallery page returned 404. The /{dream_id} route was catching /list before it reached the /list route.

Solution: Kiro identified the issue immediately and reordered routes:

# Fixed order
@router.get("/list")  # Specific routes first
async def list_dreams(): ...

@router.get("/{dream_id}")  # Generic routes last
async def get_dream(dream_id: str): ...

Accomplishments that we're proud of

1. Haunting User Interface That's Polished and Unforgettable

Created a dreamlike, immersive interface that perfectly embodies the Costume Contest aesthetic—where the subject matter (dreams) and the design are inseparable.

Why Dreams + Spooky UI = Perfect Match:

  • Dreams are naturally mysterious and eerie—the UI reflects this
  • The subconscious is dark and unknown—the dark theme mirrors this
  • Dreams fade and blur—glassmorphism captures this ephemeral quality
  • Dreams glow in memory—glowing elements evoke this lingering presence
  • Dreams are atmospheric—fog effects create the same mood

Design Elements:

  • Glassmorphism Design: Frosted glass panels with backdrop blur—like looking through the veil between consciousness and dreams
  • Purple/Indigo Palette: Deep, mysterious colors that evoke the subconscious and twilight hours when dreams occur
  • Smooth Animations: Fade-ins, transitions, and hover effects that feel ethereal—mimicking how dreams shift and morph
  • Fog Effects: Subtle background animations that create depth and atmosphere—like the fog of memory
  • Glowing Elements: Pulsing icons and borders that draw the eye—like fragments of dreams that stay with you
  • Spooky Design Elements: Dark theme with haunting visual touches—reflecting the mysterious nature of the dream world

This is the essence of the Costume Contest category—a haunting user interface that's polished and unforgettable, where spooky design elements don't just look good, they enhance the app's function of exploring the mysterious world of dreams.

2. Dreamlike UI/UX - Where Form Meets Function

Created an immersive, haunting interface where the design is inseparable from the content:

The Dream World Aesthetic:

  • Glassmorphism: Like looking through the hazy boundary between sleep and waking
  • Purple/Indigo Palette: The colors of twilight, dusk, and the subconscious
  • Smooth Transitions: Dreams don't cut—they morph and blend
  • Fog Effects: Memory is foggy, dreams are atmospheric
  • Glowing Elements: Some dream fragments glow brighter than others
  • Dark Theme: The subconscious is a dark, mysterious place
  • Responsive Design: Dreams follow you everywhere (desktop + mobile)

Why This Matters for Costume Contest: Dreams are inherently spooky—they're surreal, mysterious, sometimes unsettling. The UI doesn't just look haunting for aesthetic reasons—it's haunting because dreams themselves are haunting. Every design choice reflects the nature of the dream world:

  • Blurred edges (memories fade)
  • Glowing elements (vivid moments)
  • Dark backgrounds (the unknown)
  • Smooth animations (dreamlike flow)
  • Purple hues (the twilight zone between consciousness and unconsciousness)

The UI doesn't just display dreams—it feels like stepping into one. It's a portal to the mysterious, beautiful, slightly unsettling world of the subconscious.

3. Real-Time Processing with Progress Tracking

Built a robust background processing system:

  • Non-blocking dream processing
  • Real-time progress updates (0% → 100%)
  • Stage-by-stage feedback ("Analyzing dream...", "Creating images...", "Generating videos...")
  • Resume capability (close browser, come back later)
  • Error recovery with retry logic

4. Automated Documentation

Agent hooks kept documentation perfectly synchronized:

  • 50+ automatic updates
  • Always up-to-date README
  • Architecture diagrams in sync with code
  • API documentation current
  • Zero documentation debt

5. Multi-Language Support in Minutes

Added support for 9 languages using agent hooks:

  • English, French, Spanish
  • Portuguese (Portugal & Brazil)
  • German, Italian
  • Japanese, Chinese (Simplified)

Total time: 5 minutes (would have been hours manually)

6. Cloud-Native Architecture

Designed for AWS from the ground up:

  • MySQL RDS for persistence
  • S3 for media storage
  • Secrets Manager for credentials
  • App Runner for auto-scaling
  • VPC connector for security
  • Docker containerization

7. Kiro Feature Mastery

Leveraged every unique Kiro feature:

  • Spec-Driven Development: 2 complete specs with 70+ tasks
  • Steering Documents: 3 docs guiding all development
  • Agent Hooks: 3 hooks automating 50+ updates
  • MCP Servers: 5 servers extending capabilities
  • Vibe Coding: 80% of code generated conversationally

This project showcases Kiro's full potential.

What we learned

1. The Power of Spec-Driven Development

Before: Jump into coding, figure it out as you go, lose track of progress.

After: Define requirements first, break into tasks, track progress systematically.

Key Insight: Spending 8 hours on specs saved 40+ hours of rework and confusion. Kiro's ability to understand and reference specs throughout development was game-changing.

2. Steering Documents Are Essential

Before: Repeat context in every conversation, inconsistent patterns, style drift.

After: Define standards once, Kiro applies them automatically, perfect consistency.

Key Insight: The three steering docs (product, tech, structure) ensured every component Kiro generated followed the same patterns. No more "why did I do it differently here?"

3. Agent Hooks Eliminate Maintenance

Before: Manually update docs after code changes, translations take hours, repetitive tasks pile up.

After: Hooks automate everything, docs always current, translations in minutes.

Key Insight: The 3 agent hooks saved an estimated 20+ hours of manual work. Documentation never fell behind code.

4. MCP Servers Extend Capabilities Infinitely

Before: Switch between IDE, browser, terminal, AWS console, documentation sites.

After: Everything accessible from Kiro via MCP servers.

Key Insight: The 5 MCP servers (fetch, chrome-devtools, strands-agents, aws-docs, aws-api) eliminated context switching and saved 15+ hours of research and setup time.

5. Vibe Coding Is the Future

Before: Write code line by line, debug syntax errors, search Stack Overflow.

After: Describe what you want, get production-ready code instantly.

Key Insight: 80% of the codebase was generated through natural language conversation. Kiro didn't just write code—it understood architecture, patterns, and best practices.

6. Kiro as a Development Partner

Learning: Kiro isn't just a code generator—it's a development partner that:

  • Understands context and remembers decisions
  • Suggests best practices proactively
  • Explains "why" behind recommendations
  • Catches bugs before they happen
  • Maintains consistency across the codebase

Key Insight: The 3-4x productivity boost isn't just about speed—it's about quality, consistency, and learning.

What's next for DreamWeen – Where Your Dreams Come Alive

Phase 1: Enhanced Features (1-2 Months)

1. Advanced AI Capabilities

  • Dream Insights: Pattern detection across multiple dreams
    • Recurring symbols and themes
    • Emotion heatmaps over time
    • Character relationship graphs
    • Location frequency analysis
  • Lucid Dream Detection: Identify dreams where you were aware you were dreaming
  • Dream Continuation: Generate "what happens next" scenarios
  • Style Transfer: Apply different artistic styles to existing dreams (surreal, cinematic, anime, oil painting)

2. Social Features

  • Dream Sharing: Generate public URLs for sharing dreams
  • Privacy Controls: Public, private, or friends-only dreams
  • Dream Collections: Curate themed collections (nightmares, flying dreams, etc.)
  • Community Gallery: Explore public dreams from other users
  • Like & Comment: Engage with shared dreams
  • Follow System: Follow users with interesting dreams

3. Enhanced Media

  • Longer Videos: Extend from 60s to 2-3 minutes
  • Background Music: AI-generated ambient soundtracks based on dream mood
  • Voice Narration: Text-to-speech narration of dream description
  • 4K Resolution: Higher quality video generation
  • VR Support: View dreams in virtual reality

4. Mobile Apps

  • iOS App: Native iPhone/iPad app with offline recording
  • Android App: Native Android app
  • Push Notifications: Instant alerts when dreams complete
  • Widget: Quick dream capture from home screen

Long-Term Vision

DreamWeen aims to become:

  • The world's largest dream visualization platform
  • A tool for mental health and self-discovery
  • A creative resource for artists and filmmakers
  • A research platform for sleep science
  • A social network for the subconscious

Ultimate Goal: Preserve the invisible universe inside every human mind, making dreams as permanent and shareable as photographs.


"Every night, we create entire universes—mysterious, beautiful, haunting. DreamWeen makes sure they don't fade away."

Built With

Share this project:

Updates