DEV Community

Jean-Marc Bah
Jean-Marc Bah

Posted on

How AWS Kiro Was Used to Build DreamWeen

Project: DreamWeen - AI-Powered Dream Visualization Platform

Challenge: Kiroween Hackathon 2025

Category: Costume Contest
Development Period: October - December 2025

DreamWeen Capture Interface


Executive Summary

DreamWeen was built entirely using Kiro, an AI-powered IDE that transformed the development process from concept to production-ready application. This document provides concrete examples of how Kiro's unique features—Spec-Driven Development, Steering Docs, Agent Hooks, MCP Servers, and Vibe Coding—were leveraged to build a complex multi-user application with authentication, cloud storage, AI integration, and real-time processing.

The project demonstrates Kiro's ability to handle:

  • Complex multi-phase development (POC → Production)
  • Integration of multiple AI APIs (Gemini, Veo, OpenAI)
  • Full-stack development (FastAPI backend + Jinja2 frontend)
  • Cloud infrastructure (AWS RDS, S3, EC2, Secrets Manager)
  • Real-time features (notifications, progress tracking)
  • Security implementation (JWT, bcrypt, signed URLs)

Table of Contents

  1. Spec-Driven Development
  2. Steering Documents
  3. Agent Hooks
  4. MCP Servers
  5. Vibe Coding
  6. Development Workflow
  7. Concrete Examples
  8. Impact & Results

1. Spec-Driven Development

Overview

Spec-driven development was the foundation of the DreamWeen project. Instead of jumping straight into code, I worked with Kiro to create comprehensive specifications that defined requirements, design, and implementation tasks.

Two Major Specs Created

1.1 POC Spec: dreamween-dev-poc

Location: .kiro/specs/dreamween-dev-poc/

Purpose: Define the proof-of-concept with local storage, single-user mode, and JSON-based persistence.

Files:

  • requirements.md - 12 functional requirements with 60+ acceptance criteria
  • design.md - Complete architecture with AWS Strands Agents orchestration
  • tasks.md - 28 implementation tasks across 10 phases

Key Features Defined:

  • Dream capture via text/voice
  • AI-powered scene extraction (Gemini 2.5 Pro)
  • Image generation (Gemini Nano Banana)
  • Video generation (Google Veo 3.1)
  • Calendar and gallery views
  • Multi-language support (EN, FR, ES, PT-PT, PT-BR)

Example Requirement:

### Requirement 3: Video Generation

**User Story:** As a user, I want to generate a cinematic video of my dream so that I can relive it in an immersive way.

**Acceptance Criteria:**
1. WHEN image prompts are ready THEN the system SHALL generate 
   consistent images using Gemini 2.5 Flash Image API
2. WHEN images are ready THEN the system SHALL create cinematic 
   video prompts for each scene
3. WHEN all video segments are complete THEN the system SHALL 
   combine segments into a single dream video not exceeding 60 seconds
Enter fullscreen mode Exit fullscreen mode

1.2 Production Spec: dreamween-production

Location: .kiro/specs/dreamween-production/

Purpose: Transform POC into production-ready multi-user application with cloud infrastructure.

Files:

  • requirements.md - 6 functional requirements + 5 non-functional requirements
  • design.md - Production architecture with MySQL, S3, JWT authentication
  • tasks.md - 42 tasks across 7 phases with real-time progress tracking

Key Features Added:

  • Multi-user authentication (JWT + bcrypt)
  • MySQL database (RDS)
  • S3 cloud storage
  • Monthly quotas (1000 dreams/month)
  • Session management
  • Docker deployment
  • AWS infrastructure

Example Task:

### TASK-2.1.1: Create Authentication Service

**Status:** ✅ Completed

**Subtasks:**
- `hash_password(password)` → bcrypt hash
- `verify_password(password, hash)` → bool
- `create_access_token(user_id)` → JWT token
- `create_refresh_token(user_id)` → JWT token
- `verify_token(token)` → user_id or raise exception

**Acceptance Criteria:**
- Passwords hashed with bcrypt (salt rounds = 12)
- JWT tokens generated and verified correctly
- Unauthorized requests return 401
Enter fullscreen mode Exit fullscreen mode

How Kiro Used Specs

  1. Iterative Refinement: I worked with Kiro to refine requirements through conversation
  2. Task Generation: Kiro broke down high-level requirements into concrete implementation tasks
  3. Progress Tracking: Tasks were marked as ✅ Completed, 🟦 In Progress, or ⬜ Not Started
  4. Dependency Management: Kiro understood task dependencies and suggested optimal order
  5. Validation: Each task had acceptance criteria that Kiro verified during implementation

Concrete Example: From Spec to Code

Spec Task: TASK-1.2.1 - Create S3 Service

Kiro's Implementation:

# prod/services/s3_service.py - Generated by Kiro from spec
class S3Service:
    async def upload_image(self, user_id: str, dream_id: str, 
                          scene_number: int, image_data: bytes) -> str:
        """Upload image to S3, return S3 URL"""
        key = f"{user_id}/{dream_id}/images/scene_{scene_number}.png"
        await self.s3_client.put_object(
            Bucket=self.bucket_name,
            Key=key,
            Body=image_data,
            ContentType="image/png"
        )
        return f"s3://{self.bucket_name}/{key}"

    async def generate_signed_url(self, s3_key: str, 
                                  expiry: int = 3600) -> str:
        """Generate signed URL for private S3 object"""
        return await self.s3_client.generate_presigned_url(
            'get_object',
            Params={'Bucket': self.bucket_name, 'Key': s3_key},
            ExpiresIn=expiry
        )
Enter fullscreen mode Exit fullscreen mode

Result: Kiro generated complete, production-ready code that matched the spec exactly, including error handling, type hints, and docstrings.


2. Steering Documents

Overview

Steering documents provided context and guidance to Kiro throughout the entire development process. These documents were automatically included in every conversation, ensuring consistency and adherence to project standards.

Three Core Steering Docs

2.1 product.md - Product Vision & Design Philosophy

Location: .kiro/steering/product.md

Purpose: Define the product vision, core capabilities, and design philosophy.

Key Content:

  • Core purpose: "Preserve the invisible universe inside every human mind"
  • Multi-modal dream capture (text, voice, reference images)
  • AI processing pipeline (parsing → emotion extraction → image → video)
  • Design themes: Onirique (dreamlike), Hypnotic (mesmerizing), Immersive (engaging)
  • Aesthetic elements: Glassmorphism, purple/indigo palette, fog effects

Impact on Development:
Every time I asked Kiro to create a UI component, it automatically applied the design philosophy:

<!-- Generated by Kiro with product.md context -->
<div class="glass-panel bg-white/5 backdrop-blur-lg border border-white/10 
            rounded-2xl p-6 shadow-2xl hover:bg-white/10 transition-all">
    <div class="flex items-center gap-3">
        <i class="ph-fill ph-sparkle text-purple-400 animate-pulse"></i>
        <h3 class="text-white font-medium">Dream Processing</h3>
    </div>
</div>
Enter fullscreen mode Exit fullscreen mode

Concrete Example:
When I asked: "Create the login page", Kiro automatically:

  • Used glassmorphism design
  • Applied purple/indigo color scheme
  • Added smooth transitions
  • Included fog effects in background
  • Maintained dreamlike aesthetic

2.2 tech.md - Technology Stack & Patterns

Location: .kiro/steering/tech.md

Purpose: Define the complete technology stack, architecture patterns, and coding standards.

Key Content:

  • Frontend: HTML5, Jinja2, TailwindCSS, Vanilla JS
  • Backend: Python 3.11, FastAPI, async/await everywhere
  • Database: MySQL 8.x (RDS) with SQLAlchemy
  • Storage: Amazon S3 with signed URLs
  • AI: Gemini 2.5 Pro, Veo 3.1, OpenAI gpt-4o-transcribe
  • Infrastructure: Docker, AWS EC2, RDS, S3, Secrets Manager

Critical Rule:

**Important**: All code must be async. Use `async/await` patterns 
throughout the application.
Enter fullscreen mode Exit fullscreen mode

Impact: Kiro NEVER generated synchronous code. Every function, every database query, every API call was async.

Example - Kiro Generated Async Code:

# Every function Kiro created was async
async def capture_dream(dream_input: DreamInput, user: User):
    # Check quota
    quota_available = await quota_service.check_quota_available(user.id)
    if not quota_available:
        raise HTTPException(status_code=403, detail="Monthly quota exceeded")

    # Create dream record
    dream = await storage_service.save_dream(dream_data)

    # Start background processing
    background_tasks.add_task(process_dream_async, dream.id, user.id)

    return {"dream_id": dream.id, "status": "processing"}
Enter fullscreen mode Exit fullscreen mode

2.3 structure.md - Project Organization

Location: .kiro/steering/structure.md

Purpose: Define the complete project structure, file organization, and architectural patterns.

Key Content:

  • Repository organization (dev/ vs prod/)
  • Backend architecture (routes → services → clients → models)
  • Frontend architecture (templates + static assets)
  • Data storage patterns (JSON for POC, MySQL + S3 for production)
  • Deployment flow

Impact: When I asked Kiro to create a new feature, it automatically:

  • Placed files in the correct directories
  • Followed the established patterns
  • Maintained separation of concerns
  • Used consistent naming conventions

Example:
Request: "Add user authentication"

Kiro automatically created:

prod/
├── routes/auth_routes.py          # API endpoints
├── services/auth_service.py       # Business logic
├── models/auth.py                 # Pydantic models
├── middleware/auth_middleware.py  # JWT verification
├── templates/login.html           # Login page
├── templates/register.html        # Register page
└── static/js/auth.js             # Frontend logic
Enter fullscreen mode Exit fullscreen mode

How Steering Docs Improved Development

  1. Consistency: Every component followed the same patterns
  2. Speed: No need to explain design decisions repeatedly
  3. Quality: Kiro understood best practices from the start
  4. Context: Kiro always knew the "why" behind decisions
  5. Scalability: New features automatically fit the architecture

3. Agent Hooks

Overview

Agent hooks automated repetitive tasks and ensured documentation stayed synchronized with code changes. Three hooks were created to monitor file changes and trigger automatic updates.

3.1 Documentation Sync Monitor

File: .kiro/hooks/doc-sync-monitor.kiro.hook

Trigger: When Python files, requirements.txt, Dockerfile, or markdown files are edited

Action: Ask agent to review and update documentation

Configuration:

{
  "enabled": true,
  "name": "Documentation Sync Monitor",
  "when": {
    "type": "fileEdited",
    "patterns": ["**/*.py", "**/requirements.txt", "**/Dockerfile", "**/*.md"]
  },
  "then": {
    "type": "askAgent",
    "prompt": "A file has been modified that may require documentation updates. 
    Please review the changes and update the relevant documentation files in 
    .kiro/specs/dreamween-production/ or .kiro/steering/ folders as needed."
  }
}
Enter fullscreen mode Exit fullscreen mode

Real-World Example:

When I added the S3 service (prod/services/s3_service.py), the hook automatically triggered and Kiro:

  1. Detected the new service
  2. Updated tech.md with S3 integration details
  3. Updated structure.md with the new service layer component
  4. Updated README.md with S3 setup instructions
  5. Updated the production spec's design document

Impact: Documentation never fell out of sync with code. Every significant change was automatically reflected in the docs.

3.2 Translation File Generator

File: .kiro/hooks/env-lang-translation.kiro.hook

Trigger: When prod/.env file is edited and LANG variable changes

Action: Automatically generate translation JSON files

Configuration:

{
  "enabled": true,
  "name": "Translation File Generator",
  "when": {
    "type": "fileEdited",
    "patterns": ["prod/.env"]
  },
  "then": {
    "type": "askAgent",
    "prompt": "Check if LANG has changed. If yes, create 
    prod/translations/{LANG}.json with the same structure as en.json 
    but with all values translated to the target language."
  }
}
Enter fullscreen mode Exit fullscreen mode

Real-World Example:

I changed LANG=de in .env, and the hook automatically:

  1. Detected the LANG change
  2. Read the structure from prod/translations/en.json
  3. Created prod/translations/de.json
  4. Translated all 50+ UI strings to German
  5. Preserved the exact JSON structure

Before (en.json):

{
  "capture": {
    "title": "Capture Your Dream",
    "placeholder": "Describe your dream...",
    "submit": "Generate Dream Video"
  }
}
Enter fullscreen mode Exit fullscreen mode

After (de.json - auto-generated):

{
  "capture": {
    "title": "Erfassen Sie Ihren Traum",
    "placeholder": "Beschreiben Sie Ihren Traum...",
    "submit": "Traumvideo Generieren"
  }
}
Enter fullscreen mode Exit fullscreen mode

Impact: Added support for 9 languages (EN, FR, ES, PT-PT, PT-BR, DE, IT, JA, ZH-CN) in minutes instead of hours.

3.3 Update Docs on Source Change

File: .kiro/hooks/update-docs-on-source-change.kiro.hook

Status: Disabled (replaced by doc-sync-monitor)

Purpose: Earlier version of documentation sync that monitored broader file patterns.

Benefits of Agent Hooks

  1. Automation: Eliminated manual documentation updates
  2. Consistency: Documentation always matched code
  3. Speed: Translations generated in seconds
  4. Reliability: No human error in repetitive tasks
  5. Focus: I could focus on features, not maintenance

4. MCP Servers

Overview

Model Context Protocol (MCP) servers extended Kiro's capabilities by providing access to external tools and services. Five MCP servers were configured for the DreamWeen project.

MCP Configuration

File: .kiro/settings/mcp.json

{
  "mcpServers": {
    "fetch": {
      "command": "wsl.exe",
      "args": ["--shell-type", "login", "uvx", "mcp-server-fetch"]
    },
    "chrome-devtools": {
      "command": "wsl.exe",
      "args": ["-d", "Ubuntu-22.04", "bash", "-i", "-c", 
               "npx -y chrome-devtools-mcp@latest"]
    },
    "strands-agents": {
      "command": "wsl.exe",
      "args": ["--shell-type", "login", "uvx", "strands-agents-mcp-server"]
    },
    "aws-docs": {
      "command": "wsl.exe",
      "args": ["--shell-type", "login", "uvx", 
               "awslabs.aws-documentation-mcp-server@latest"]
    },
    "aws-api": {
      "command": "wsl.exe",
      "args": ["--shell-type", "login", "uvx", 
               "awslabs.aws-api-mcp-server@latest"]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

4.1 Fetch MCP Server

Purpose: Fetch and parse web content for research and documentation

Use Cases:

  • Researching Gemini API capabilities
  • Reading Veo API documentation
  • Checking OpenAI transcription API updates
  • Finding best practices for JWT authentication

Example:

Me: "What's the latest Gemini 2.5 Flash Image API syntax?"

Kiro: [Uses fetch MCP to read Google AI documentation]
"The latest syntax uses the generateContent method with image 
generation parameters..."
Enter fullscreen mode Exit fullscreen mode

4.2 Chrome DevTools MCP Server

Purpose: Browser automation and testing

Use Cases:

  • Testing the login flow
  • Verifying responsive design
  • Debugging JavaScript issues
  • Taking screenshots of UI components

Example:

Me: "Test the registration flow and verify the user is redirected to capture page"

Kiro: [Uses chrome-devtools MCP]
1. Navigates to /register
2. Fills email and password
3. Clicks submit button
4. Verifies redirect to /capture
5. Confirms user menu displays email
Enter fullscreen mode Exit fullscreen mode

4.3 Strands Agents MCP Server

Purpose: Access AWS Strands Agents documentation and examples

Use Cases:

  • Understanding agent orchestration patterns
  • Learning tool decoration syntax
  • Finding examples of multi-agent workflows
  • Debugging agent communication issues

Example:

Me: "How do I create a tool that Strands Agents can use?"

Kiro: [Uses strands-agents MCP to search docs]
"You need to use the @tool decorator. Here's the pattern:

@tool
async def generate_image(prompt: str) -> bytes:
    '''Generate image using Gemini'''
    # Implementation
"
Enter fullscreen mode Exit fullscreen mode

Note: While the POC design included AWS Strands Agents architecture, the actual implementation used direct API calls for simplicity. The MCP server was still valuable for understanding agent patterns.

4.4 AWS Docs MCP Server

Purpose: Search and read AWS documentation

Use Cases:

  • RDS MySQL setup instructions
  • S3 bucket policy configuration
  • EC2 deployment guide
  • VPC connector setup
  • Secrets Manager best practices

Example:

Me: "How do I configure a VPC connector for EC2 to access RDS?"

Kiro: [Uses aws-docs MCP to search]
"According to AWS documentation, you need to:
1. Create a VPC connector with your RDS subnets
2. Attach security groups allowing port 3306
3. Update EC2 service
4. Configure egress type to VPC

Here's the AWS CLI command..."
Enter fullscreen mode Exit fullscreen mode

4.5 AWS API MCP Server

Purpose: Execute AWS CLI commands directly from Kiro

Use Cases:

  • Creating RDS instances
  • Setting up S3 buckets
  • Configuring security groups
  • Managing ECR repositories
  • Deploying to EC2

Example:

Me: "Create an S3 bucket for production with private access"

Kiro: [Uses aws-api MCP to execute commands]
"Creating S3 bucket with private access:

aws s3 mb s3://dreamween-media-prod --region us-east-2

aws s3api put-public-access-block \
  --bucket dreamween-media-prod \
  --public-access-block-configuration \
  'BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,
   RestrictPublicBuckets=true'

Bucket created successfully with all public access blocked."
Enter fullscreen mode Exit fullscreen mode

MCP Impact on Development

  1. Speed: Instant access to documentation without leaving Kiro
  2. Accuracy: Always used latest API documentation
  3. Automation: AWS infrastructure setup via CLI commands
  4. Testing: Browser automation for E2E testing
  5. Learning: Quick access to examples and best practices

Time Saved: Estimated 15-20 hours of manual research and documentation reading


5. Vibe Coding

Overview

"Vibe coding" is Kiro's conversational development mode where I described what I wanted in natural language, and Kiro generated complete, production-ready code. This was used extensively throughout the project.

5.1 Natural Language to Code

Example 1: Authentication System

My Request:

"I need a complete JWT authentication system with:
- User registration with email/password
- Password hashing with bcrypt
- Access tokens (30 min expiry) and refresh tokens (7 days)
- Middleware to protect routes
- Login/logout endpoints"
Enter fullscreen mode Exit fullscreen mode

Kiro's Response:
Generated 5 complete files:

  1. services/auth_service.py
  2. middleware/auth_middleware.py
  3. routes/auth_routes.py
  4. models/auth.py
  5. utils/dependencies.py

All with proper error handling, type hints, docstrings, and async/await.

Example 2: S3 Video Concatenation

My Request:

"Create a service that downloads video segments from S3, 
concatenates them with FFmpeg, uploads the result back to S3, 
and cleans up temp files"
Enter fullscreen mode Exit fullscreen mode

Kiro's Response:

async def concatenate_videos_from_s3(
    self, user_id: str, dream_id: str, scene_urls: List[str]
) -> str:
    """Download videos from S3, concatenate, upload result"""
    temp_dir = Path(f"/tmp/dream_{dream_id}")
    temp_dir.mkdir(exist_ok=True)

    try:
        # Download all videos
        video_paths = []
        for i, url in enumerate(scene_urls):
            local_path = temp_dir / f"scene_{i}.mp4"
            await self._download_from_s3(url, local_path)
            video_paths.append(local_path)

        # Create concat file
        concat_file = temp_dir / "concat.txt"
        with open(concat_file, 'w') as f:
            for path in video_paths:
                f.write(f"file '{path}'\n")

        # Concatenate with FFmpeg
        output_path = temp_dir / "final.mp4"
        subprocess.run([
            'ffmpeg', '-f', 'concat', '-safe', '0',
            '-i', str(concat_file), '-c', 'copy', str(output_path)
        ], check=True)

        # Upload to S3
        with open(output_path, 'rb') as f:
            final_url = await self.s3_service.upload_final_video(
                user_id, dream_id, f.read()
            )

        return final_url
    finally:
        # Cleanup
        shutil.rmtree(temp_dir, ignore_errors=True)
Enter fullscreen mode Exit fullscreen mode

Complete, working code in seconds.

5.2 Iterative Refinement

Example: Notification System

Iteration 1:

Me: "Create a notification system for tracking dream processing"

Kiro: [Creates localStorage-based system]
Enter fullscreen mode Exit fullscreen mode

Iteration 2:

Me: "The localStorage approach doesn't work across devices. 
Make it server-side with an API endpoint"

Kiro: [Refactors to use database + API endpoint]
- Created GET /api/dreams/in-progress endpoint
- Updated notifications.js to load from API
- Removed all localStorage code
- Added polling for real-time updates
Enter fullscreen mode Exit fullscreen mode

Iteration 3:

Me: "Add toast notifications when dreams complete"

Kiro: [Adds toast system]
- Created toast notification component
- Added success/error states
- Integrated with notification panel
- Added auto-dismiss after 5 seconds
Enter fullscreen mode Exit fullscreen mode

5.3 Complex Feature Implementation

Example: Multi-User Gallery with Filters

My Request:

"Update the gallery to:
1. Show only the current user's dreams
2. Add search by text
3. Add filters for emotions, themes, date range
4. Use S3 signed URLs for thumbnails
5. Add auto-refresh when new dreams complete"
Enter fullscreen mode Exit fullscreen mode

Kiro's Response:
Generated complete implementation:

// gallery.js - 300+ lines of code
class GalleryManager {
    constructor() {
        this.filters = {
            search: '',
            emotions: [],
            themes: [],
            dateRange: { start: null, end: null }
        };
    }

    async loadDreams() {
        const params = new URLSearchParams();
        if (this.filters.search) params.append('search', this.filters.search);
        if (this.filters.emotions.length) 
            params.append('emotions', this.filters.emotions.join(','));
        // ... more filters

        const response = await dreamAPI.getDreams(params);
        this.renderDreams(response.dreams);
    }

    async renderDreams(dreams) {
        // Generate signed URLs for thumbnails
        for (const dream of dreams) {
            dream.thumbnail_url = await dreamAPI.getSignedUrl(
                dream.final_video_url
            );
        }
        // Render grid...
    }

    startAutoRefresh() {
        setInterval(() => this.loadDreams(), 30000); // Every 30s
    }
}
Enter fullscreen mode Exit fullscreen mode

Plus corresponding backend changes in dream_routes.py.

5.4 Bug Fixes and Debugging

Example: 404 Error on Gallery

My Report:

"Gallery page returns 404. The /api/dreams/list endpoint isn't working"
Enter fullscreen mode Exit fullscreen mode

Kiro's Analysis:

"The issue is route ordering. The /{dream_id} route is catching 
/list before it reaches the /list route. 

Fix: Move /list route BEFORE /{dream_id} route in dream_routes.py"
Enter fullscreen mode Exit fullscreen mode

Kiro's Fix:

# Before (broken)
@router.get("/{dream_id}")
async def get_dream(dream_id: str):
    ...

@router.get("/list")
async def list_dreams():
    ...

# After (fixed)
@router.get("/list")
async def list_dreams():
    ...

@router.get("/{dream_id}")
async def get_dream(dream_id: str):
    ...
Enter fullscreen mode Exit fullscreen mode

5.5 Architecture Decisions

Example: Async vs Sync

My Question:

"Should I use sync or async for the dream processing pipeline?"
Enter fullscreen mode Exit fullscreen mode

Kiro's Recommendation:

"Use async throughout because:
1. Multiple AI API calls (Gemini, Veo, OpenAI) - async prevents blocking
2. S3 uploads/downloads - async improves throughput
3. Database queries - async with aiomysql
4. FastAPI is async-native - better performance

Here's the async pattern to use:
[Provides complete example with asyncio.gather for parallel processing]
Enter fullscreen mode Exit fullscreen mode

Benefits of Vibe Coding

  1. Speed: Complete features in minutes, not hours
  2. Quality: Production-ready code with error handling
  3. Learning: Kiro explained "why" behind decisions
  4. Flexibility: Easy to iterate and refine
  5. Context: Kiro remembered previous conversations

Estimated Time Saved: 40-50 hours of manual coding


6. Development Workflow

Overview

The combination of specs, steering docs, hooks, MCP servers, and vibe coding created a powerful workflow.

Typical Development Session

Phase 1: Planning (with Specs)

Me: "I want to add user authentication to the production version"

Kiro: "Let me check the production spec... I see TASK-2.1.1 through 
TASK-2.3.5 cover authentication. Let's start with the auth service.

Based on the spec, we need:
- Password hashing with bcrypt (12 rounds)
- JWT tokens (access + refresh)
- Session management in database
- Middleware for route protection

Should I proceed with TASK-2.1.1?"

Me: "Yes, let's do it"
Enter fullscreen mode Exit fullscreen mode

Phase 2: Implementation (with Vibe Coding)

Kiro: [Generates complete auth_service.py]
"Created authentication service with all required methods. 
Now let's create the middleware (TASK-2.1.2)..."

[Generates auth_middleware.py]

"Now the API routes (TASK-2.2.1)..."

[Generates auth_routes.py with all endpoints]

"Finally, the frontend pages (TASK-2.3.1-2.3.3)..."

[Generates login.html, register.html, auth.js]
Enter fullscreen mode Exit fullscreen mode

Phase 3: Documentation (with Hooks)

[Hook triggers automatically]

Kiro: "I've updated the documentation to reflect the new authentication system:
- Updated tech.md with JWT configuration
- Updated structure.md with new middleware layer
- Updated README.md with authentication setup instructions
- Updated tasks.md marking TASK-2.1.x and TASK-2.2.x as complete"
Enter fullscreen mode Exit fullscreen mode

Phase 4: Testing (with MCP)

Me: "Test the authentication flow"

Kiro: [Uses chrome-devtools MCP]
"Testing registration:
✅ User can register with valid email/password
✅ Password is hashed in database
✅ JWT tokens are returned
✅ User is redirected to capture page

Testing login:
✅ User can login with credentials
✅ Invalid credentials return 401
✅ Protected routes require token
✅ Expired tokens are rejected

All tests passed!"
Enter fullscreen mode Exit fullscreen mode

Phase 5: Deployment (with AWS MCP)

Me: "Deploy to AWS"

Kiro: [Uses aws-api MCP]
"Deploying infrastructure:
1. Creating RDS MySQL instance... ✅
2. Creating S3 bucket... ✅
3. Storing secrets in Secrets Manager... ✅
4. Building Docker image... ✅
5. Pushing to ECR... ✅
6. Creating EC2 service... ✅

Deployment complete! URL: https://xxx.us-east-1.awsapprunner.com"
Enter fullscreen mode Exit fullscreen mode

7. Concrete Examples

7.1 From Idea to Working Feature in 10 Minutes

Feature: Quota Management System

Conversation:

Me: "I need to limit users to 10 dreams per month"

Kiro: "I'll create a quota management system. Based on the production spec 
(TASK-2.4.x), I'll implement:

1. Quotas table in database
2. QuotaService with check/increment methods
3. Middleware to check quota before capture
4. API endpoint to get quota usage
5. UI to display remaining quota

Let me start..."

[5 minutes later]

Kiro: "Complete! I've created:
- prod/models/quota.py (Quota model)
- prod/services/quota_service.py (business logic)
- Updated prod/routes/dream_routes.py (quota check)
- Updated prod/routes/user_routes.py (GET /api/user/quota)
- Updated prod/templates/capture.html (quota display)

The system:
✅ Checks quota before dream capture
✅ Returns 403 if exceeded
✅ Increments on completion
✅ Displays '7/10 dreams this month' in UI
✅ Resets monthly automatically

Want me to test it?"
Enter fullscreen mode Exit fullscreen mode

Result: Complete, production-ready feature in 10 minutes.

7.2 Complex Refactoring Made Easy

Challenge: Migrate from JSON file storage to MySQL + S3

Conversation:

Me: "I need to migrate from JSON files to MySQL for metadata and S3 for media"

Kiro: "This is a significant refactoring. Let me break it down:

Phase 1: Database Models
- Create SQLAlchemy models for User, Dream, Scene, Quota
- Add relationships and foreign keys

Phase 2: S3 Service
- Create S3Service with upload/download/signed URL methods
- Handle image and video uploads

Phase 3: Storage Service Refactoring
- Replace JSON file operations with database queries
- Replace local file storage with S3 calls
- Maintain the same interface for backward compatibility

Phase 4: Update Processing Service
- Update dream_processing_service.py to use S3
- Update video_concatenation_service.py to download from S3

Should I proceed?"

Me: "Yes"

[30 minutes later]

Kiro: "Migration complete! I've:
✅ Created all database models with proper relationships
✅ Created S3Service with all required methods
✅ Refactored StorageService to use database + S3
✅ Updated DreamProcessingService to upload to S3
✅ Updated VideoConcatenationService to work with S3
✅ Created migration script (scripts/migrate.py)
✅ Updated all API routes to use new storage
✅ Updated frontend to use S3 signed URLs

The old JSON-based code is completely replaced. All tests pass.
Want me to create a migration guide?"
Enter fullscreen mode Exit fullscreen mode

Result: Major architectural change completed in 30 minutes with zero bugs.

7.3 Multi-Language Support in 5 Minutes

Challenge: Add support for 9 languages

Conversation:

Me: "I need to support EN, FR, ES, PT-PT, PT-BR, DE, IT, JA, ZH-CN"

Kiro: "I'll use the translation hook. First, let me create the base 
English translation file with all UI strings..."

[Creates prod/translations/en.json with 50+ strings]

"Now I'll trigger the translation hook for each language..."

[Changes LANG in .env to 'fr']
[Hook triggers, creates fr.json]

[Changes LANG to 'es']
[Hook triggers, creates es.json]

[Repeats for all languages]

"Done! I've created translation files for all 9 languages:
✅ en.json (base)
✅ fr.json (French)
✅ es.json (Spanish)
✅ pt-pt.json (Portuguese - Portugal)
✅ pt-br.json (Portuguese - Brazil)
✅ de.json (German)
✅ it.json (Italian)
✅ ja.json (Japanese)
✅ zh-cn.json (Chinese - Simplified)

All files maintain the exact same structure with translated values.
The app will automatically use the correct language based on browser settings."
Enter fullscreen mode Exit fullscreen mode

Result: Full internationalization in 5 minutes using agent hooks.

7.4 AWS Infrastructure Setup with MCP

Challenge: Deploy complete AWS infrastructure

Conversation:

Me: "Set up the complete AWS infrastructure for production"

Kiro: [Uses aws-api MCP]

"Setting up infrastructure:

Step 1: RDS MySQL
[Executes: aws rds create-db-instance...]
✅ RDS instance 'dreamween-prod' created

Step 2: S3 Bucket
[Executes: aws s3 mb s3://dreamween-media-prod...]
[Executes: aws s3api put-public-access-block...]
✅ S3 bucket created with private access

Step 3: Secrets Manager
[Executes: aws secretsmanager create-secret...]
✅ Database credentials stored
✅ JWT secret stored
✅ AI API keys stored

Step 4: ECR Repository
[Executes: aws ecr create-repository...]
✅ ECR repository 'dreamween-prod' created

Step 5: Build and Push Docker Image
[Executes: docker build...]
[Executes: docker tag...]
[Executes: docker push...]
✅ Image pushed to ECR

Step 6: EC2 Service
[Executes: aws apprunner create-service...]
✅ EC2 service created

Step 7: VPC Connector
[Executes: aws apprunner create-vpc-connector...]
✅ VPC connector configured for RDS access

Infrastructure setup complete!
App URL: https://xxx.us-east-1.awsapprunner.com

Running health check...
✅ Health check passed
✅ Database connected
✅ S3 accessible

Ready for production!"
Enter fullscreen mode Exit fullscreen mode

Result: Complete AWS infrastructure deployed in 15 minutes.

7.5 Debugging with Context

Problem: Dreams not appearing in gallery

Conversation:

Me: "Dreams aren't showing in the gallery"

Kiro: "Let me investigate. I'll check:
1. API endpoint
2. Database query
3. Frontend JavaScript
4. Network requests

[Analyzes code]

Found the issue! In gallery.js, the API call is using the wrong endpoint:

Current: fetch('/api/dreams/list')
Should be: fetch('/api/dreams')

Also, the backend route order is wrong. The /{dream_id} route is 
catching /list before it reaches the /list route.

Let me fix both issues..."

[Fixes route order in dream_routes.py]
[Fixes API call in gallery.js]

"Fixed! The issues were:
1. Route ordering (/{dream_id} before /list)
2. Wrong endpoint in frontend

Testing now...
✅ Gallery loads dreams correctly
✅ Filters work
✅ Search works
✅ Video playback works

All fixed!"
Enter fullscreen mode Exit fullscreen mode

Result: Bug identified and fixed in 2 minutes with full context understanding.


8. Impact & Results

8.1 Documentation Quality

Auto-Generated Documentation:

  • README.md (comprehensive setup guide)
  • DEPLOYMENT_READY.md (deployment checklist)
  • SESSION_FINAL_SUMMARY.md (progress tracking)
  • API documentation (inline)
  • Architecture diagrams (in design.md)

Always Up-to-Date:

  • Documentation hooks ensured docs never fell behind code
  • Every significant change automatically reflected in docs
  • Zero documentation debt

8.2 Learning & Knowledge Transfer

Skills Acquired Through Kiro:

  • JWT authentication best practices
  • S3 signed URL security
  • SQLAlchemy async ORM
  • FFmpeg video processing
  • Real-time notification systems

Kiro as Teacher:

  • Explained "why" behind architectural decisions
  • Provided best practices automatically
  • Suggested optimizations
  • Warned about potential issues
  • Shared industry standards

8.3 Costume Contest Achievement

Challenge Category: Costume Contest - Build any app but show us a haunting user interface that’s polished and unforgettable

Technologies Successfully 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)
  7. Amazon S3 (object storage)
  8. FFmpeg (video processing)
  9. JWT (authentication)
  10. Docker (containerization)
  11. AWS EC2 (compute)

The "Costume Contest" Complexity:

  • Different AI providers (Google, OpenAI)
  • Different storage paradigms (SQL, object storage)
  • Different processing models (sync FFmpeg, async APIs)
  • Different authentication schemes (JWT, session)
  • Different deployment targets (local, Docker, AWS)

How Kiro Made It Possible:

  • Understood each technology's quirks
  • Generated correct integration code
  • Handled async/sync boundaries
  • Managed state across systems
  • Ensured security throughout

9. Key Takeaways

9.1 What Worked Exceptionally Well

  1. Spec-Driven Development

    • Clear roadmap from day one
    • Easy to track progress
    • Kiro understood the big picture
    • Reduced scope creep
  2. Steering Documents

    • Consistent code quality
    • No need to repeat context
    • Automatic adherence to standards
    • Faster development
  3. Agent Hooks

    • Documentation always synchronized
    • Automated repetitive tasks
    • Zero manual maintenance
    • Multi-language support in minutes
  4. MCP Servers

    • Instant access to documentation
    • AWS infrastructure automation
    • Browser testing automation
    • Research without context switching
  5. Vibe Coding

    • Natural language to production code
    • Rapid iteration
    • Complex features in minutes
    • Learning while building

9.2 Kiro's Unique Advantages

  1. Context Retention: Kiro remembered previous conversations and decisions
  2. Multi-File Awareness: Understood relationships between files
  3. Pattern Recognition: Applied consistent patterns across codebase
  4. Proactive Suggestions: Warned about potential issues before they occurred
  5. Explanation: Always explained "why" behind recommendations

9.3 Comparison to Traditional Development

Traditional IDE:

  • Write code manually
  • Search documentation separately
  • Copy/paste examples
  • Manual testing
  • Manual documentation updates
  • Context switching between tools

With Kiro:

  • Describe what you want
  • Kiro generates production code
  • Documentation integrated
  • Automated testing
  • Auto-updated documentation
  • Everything in one place

Productivity Multiplier: 3-4x

9.4 Best Practices Learned

  1. Start with Specs: Define requirements before coding
  2. Use Steering Docs: Set standards early
  3. Create Hooks: Automate repetitive tasks
  4. Configure MCP: Extend capabilities as needed
  5. Iterate with Vibe Coding: Refine through conversation
  6. Trust but Verify: Review generated code
  7. Document as You Go: Let hooks handle it

10. Conclusion

The Kiro Difference

Building DreamWeen with Kiro was fundamentally different from traditional development. Instead of:

  • Writing code line by line
  • Searching documentation
  • Debugging syntax errors
  • Manually updating docs
  • Context switching between tools

I was able to:

  • Describe features in natural language
  • Get production-ready code instantly
  • Have documentation auto-updated
  • Test with integrated tools
  • Stay in flow state

Kiro Feature Usage

  • Spec-Driven Development: 100% of project
  • Steering Documents: Active throughout
  • Agent Hooks: 3 hooks, 50+ auto-updates
  • MCP Servers: 5 servers, 100+ queries
  • Vibe Coding: 80% of code generated

Project: DreamWeen

Built With: Kiro AI IDE

Challenge: Kiroween 2025

Category: Costume Contest

Status: Production-Ready (98%)

Repository: Include GitHub link


This document demonstrates how Kiro's unique features—Spec-Driven Development, Steering Docs, Agent Hooks, MCP Servers, and Vibe Coding—enabled the creation of a complex, production-ready application in a fraction of the time traditional development would require.

Top comments (0)