Skip to content

Talecraft AI is a AI-powered Storytelling Web Application built for our hackathon entry to Futurehack 2025

License

Notifications You must be signed in to change notification settings

notedwin-dev/talecraft-ai

Repository files navigation

TaleCraft AI

🎬 TaleCraft AI

AI-Powered Interactive Storytelling Platform - Transform character images and story prompts into rich multimedia experiences with consistent character rendering, voice narration, and professional video generation.

Demo Ready MVP Status Documentation Hackathon Ready

✨ Key Features

🎭 Character DNA System - Upload character images with AI-powered DNA extraction for visual consistency across scenes
πŸ€– Advanced AI Generation - Powered by Google Gemini AI for high-quality, contextual storytelling
🐍 Free Python SD Service - Local Stable Diffusion service with GPU acceleration (0$ cost, 10x faster, 100% private)
🎨 Smart Storyboards - Automatic storyboard creation using Stable Diffusion models with character consistency
πŸ“ 4-Scene Story Architecture - AI-generated multi-scene narratives optimized for visual storytelling
πŸŽ™οΈ Voice Narration - Professional voice synthesis with customizable emotions and languages
πŸŽ₯ Video Compilation - Automatic video creation combining story, images, motion effects, and narration
πŸ“š Multi-Format Export - Download stories as PDF, video (MP4), or shareable web links
πŸ”„ Real-Time Progress - WebSocket-powered live updates during story generation
πŸ“± Responsive Design - Complete mobile optimization with touch-friendly interface
πŸŒ™ Dark Mode - Full dark mode support with system preference detection πŸ’Ύ Smart Save System - Private/public story saving with instant URL sharing

πŸ† Hackathon Features

Character DNA Technology

  • AI-powered character analysis using CLIP embeddings
  • Visual consistency across all generated scenes
  • Support for any character style (cartoon, realistic, fantasy, etc.)

Multi-AI Orchestration

  • Story Generation: Google Gemini AI for structured narratives
  • Image Generation: Stable Diffusion for character-consistent visuals
  • Voice Synthesis: ElevenLabs for professional narration
  • Video Compilation: FFmpeg for motion effects and scene transitions

Free Python Stable Diffusion Service

  • Zero Cost: No API fees, unlimited image generation
  • GPU Acceleration: 10x faster generation with NVIDIA GPUs (5-15s vs 30-60s)
  • 100% Privacy: Images never leave your computer
  • Smart Fallback: Automatic cloud API fallback when service unavailable
  • Easy Setup: 5-minute installation with automated scripts

Real-Time Generation Pipeline

  • WebSocket-powered progress tracking
  • Live status updates with time estimates
  • Background processing with job management
  • Failure recovery and graceful degradation

Professional Export Options

  • PDF Storybooks: Formatted documents with scenes and images
  • MP4 Videos: 15-30 second animated stories with voiceover
  • Web Sharing: Instant shareable links with social media integration
  • Audio Files: Voice-only narration downloads

User Experience Innovation

  • One-Click Demo: 4 pre-loaded character archetypes for instant testing
  • Progressive Upload: Drag-and-drop with real-time preview
  • Smart Completion: Guided workflow with validation and progress indicators
  • Mobile Optimized: Touch-friendly interface with responsive design

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • Google Gemini API Key
  • Hugging Face API Token
  • Supabase Account
  • ElevenLabs API Key (optional)

Installation

# 1. Clone and install dependencies
git clone <repository-url>
cd talecraft-ai
npm run install:all

# 2. Configure environment (copy and edit)
cp server/.env.example server/.env
# Edit server/.env with your API keys

# 3. Start development servers
npm run dev

🎯 Ready for MVP Demo! Visit http://localhost:5173 and start creating stories.

πŸ“– Need detailed setup? See QUICK_START.md for step-by-step instructions.

πŸ—οΈ Architecture

graph TB
    subgraph "Frontend (React + Vite)"
        A[Character Upload] --> B[Story Creation]
        B --> C[AI Generation]
        C --> D[Story Preview]
        D --> E[Export & Share]
    end
    
    subgraph "Backend (Node.js + Express)"
        F[API Routes] --> G[AI Services]
        G --> H[AWS S3 Storage]
        F --> I[WebSocket Updates]
    end
    
    subgraph "AI Services"
        J[Hugging Face] --> K[Story Generation]
        J --> L[Image Generation]
        M[ElevenLabs] --> N[Voice Synthesis]
    end
    
    A --> F
    G --> J
    G --> M
Loading

πŸ“Š Technology Stack

Frontend

  • React 18 - Modern UI framework with hooks and concurrent features
  • Vite - Lightning-fast development and build tool
  • Tailwind CSS - Utility-first CSS framework for rapid styling
  • Framer Motion - Smooth animations and transitions
  • Zustand - Lightweight state management
  • React Router - Client-side routing

Backend

  • Node.js - JavaScript runtime for server-side development
  • Express.js - Minimal web framework for APIs
  • Multer - File upload handling middleware
  • WebSocket - Real-time communication for progress updates
  • Sharp - High-performance image processing

AI & Services

  • Google Gemini Pro - Advanced story generation and character analysis
  • Python Stable Diffusion Service - Local, free GPU-accelerated image generation
  • Hugging Face API - Cloud fallback for story and image generation models
  • ElevenLabs - Premium voice synthesis
  • AWS S3 - Scalable cloud storage
  • FFmpeg - Video processing and compilation

🎯 Hackathon Demo Flow

4-Minute Complete Demonstration

  1. Character Upload (30 seconds)

    • Select from 4 demo characters OR upload custom image
    • AI processes character DNA with visual feedback
    • Character card displays with extracted traits
  2. Story Creation (60 seconds)

    • Choose genre: Adventure, Fantasy, Sci-Fi, Mystery
    • Set tone: Lighthearted, Serious, Humorous, Dramatic
    • Enter story prompt: "What if [character] discovered a magical artifact?"
    • Configure voice and video options
  3. AI Generation (2-3 minutes)

    • Real-time progress bar with detailed steps:
      • Character DNA Analysis βœ“
      • Story Generation (Gemini AI) βœ“
      • Scene Image Creation (Stable Diffusion) βœ“
      • Voice Narration (ElevenLabs) βœ“
      • Video Compilation (FFmpeg) βœ“
    • Live status updates: "Generating scene 2 of 4..."
  4. Results & Export (30 seconds)

    • Tabbed Preview: Full story, scene breakdown, character details
    • Instant Download: PDF storybook, MP4 video
    • One-Click Sharing: Copy shareable URL or social media
    • Save Options: Private or public story library

Key Demo Talking Points

  • "Upload any character and maintain visual consistency"
  • "4-scene structured storytelling optimized for engagement"
  • "Real-time AI coordination across multiple models"
  • "Professional export quality in under 5 minutes"
  • "Complete mobile experience with dark mode"

πŸ“ Project Structure

talecraft-ai/
β”œβ”€β”€ client/                 # React frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/     # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ pages/          # Page components
β”‚   β”‚   β”œβ”€β”€ stores/         # State management
β”‚   β”‚   └── utils/          # Helper functions
β”œβ”€β”€ server/                 # Node.js backend
β”‚   β”œβ”€β”€ routes/             # API endpoints
β”‚   β”œβ”€β”€ services/           # Business logic
β”‚   β”œβ”€β”€ middleware/         # Express middleware
β”‚   └── utils/              # Server utilities
β”œβ”€β”€ DOCUMENTATION.md        # Comprehensive technical docs
β”œβ”€β”€ QUICK_START.md         # 5-minute setup guide
└── README.md              # This file

πŸ”§ Development

Available Scripts

npm run dev          # Start both frontend and backend
npm run client:dev   # Start only frontend (port 5173)
npm run server:dev   # Start only backend (port 3001)
npm run build        # Build for production
npm start           # Start production server
npm run install:all # Install all dependencies

Environment Configuration

Key environment variables (see server/.env.example):

HUGGING_FACE_TOKEN=your_key_here
AWS_ACCESS_KEY_ID=your_key_here
AWS_SECRET_ACCESS_KEY=your_secret_here
AWS_S3_BUCKET=your_bucket_name
ELEVENLABS_API_KEY=your_key_here

πŸ“š Documentation

🌟 Key Differentiators

For Hackathon Judges

  • Technical Innovation: Multi-AI model orchestration with real-time coordination
  • Character Consistency: Advanced CLIP embedding system for visual coherence
  • User Experience: Complete 4-minute workflow from upload to shareable content
  • Professional Quality: Broadcast-ready video output with motion effects
  • Scalable Architecture: Production-ready WebSocket infrastructure

Competitive Advantages

  • Character DNA System: Unique visual consistency technology
  • 4-Scene Story Structure: Optimized narrative format for engagement
  • Multi-Modal Export: PDF, MP4, and web sharing in one platform
  • Real-Time Processing: Live progress tracking with time estimates
  • Mobile-First Design: Complete responsive experience with dark mode
  • One-Click Demo: Instant testing with pre-loaded characters

Target Market Impact

  • Content Creators: Social media storytellers, YouTubers, TikTokers
  • Educators: Interactive lesson creation, student engagement tools
  • Businesses: Marketing storytelling, brand narratives, training materials
  • Entertainment: Indie game developers, comic creators, animation studios

πŸ” Security & Performance

  • βœ… Input validation and sanitization
  • βœ… File type and size restrictions
  • βœ… Rate limiting on API endpoints
  • βœ… Secure AWS S3 integration
  • βœ… CORS configuration
  • βœ… Environment-based configuration
  • βœ… Optimized image processing
  • βœ… Efficient state management

πŸš€ Deployment Ready

The application is production-ready with:

  • Docker containerization support
  • Environment-based configuration
  • Health check endpoints
  • Error monitoring integration
  • Scalable architecture
  • CDN-ready static assets

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸš€ Deployment & Production Ready

Cloud Infrastructure

  • Cloudflare R2: Scalable object storage with global CDN
  • WebSocket Scaling: Real-time communication with load balancing
  • Docker Support: Containerized deployment for easy scaling
  • Environment Config: Production-ready configuration management

Performance Optimizations

  • Image Processing: Sharp-powered optimization with automatic resizing
  • Caching Strategy: Smart caching for characters and generated content
  • Background Jobs: Queue-based processing for heavy AI operations
  • Error Handling: Graceful degradation with fallback mechanisms

Security Features

  • JWT Authentication: Secure user sessions with token-based auth
  • File Validation: Comprehensive image upload security
  • Rate Limiting: API protection against abuse
  • Data Privacy: User data encryption and secure storage

🎯 Hackathon Submission Status: βœ… COMPLETE

Your TaleCraft AI application is fully functional and ready for demonstration!

Submission Checklist:

  • βœ… Demo Ready: 4-minute complete workflow demonstration
  • βœ… Technical Innovation: Multi-AI orchestration with character consistency
  • βœ… User Experience: Mobile-responsive with dark mode support
  • βœ… Professional Output: PDF, MP4, and web sharing capabilities
  • βœ… Documentation: Comprehensive setup and API documentation
  • βœ… Production Code: Clean, scalable, and well-structured codebase

Next Steps:

  1. Set up environment variables (see QUICK_START.md)
  2. Run npm run dev to start development servers
  3. Test complete workflow with demo characters
  4. Prepare hackathon presentation and live demo

Built with ❀️ for the future of AI-powered interactive storytelling

πŸš€ Features

  • Character DNA System: Upload images with auto-processing and CLIP embeddings
  • AI Story Engine: 4-scene story generation with branching narratives
  • Visual Generation: Consistent character rendering with style transfer
  • Video Synthesis: 15-30s animated videos with motion effects
  • Multi-Format Export: MP4, PDF, and shareable web links
  • Voice Narration: Emotion-based voice synthesis in multiple languages

πŸ—οΈ Architecture

talecraft-ai/
β”œβ”€β”€ client/          # React frontend (Vite)
β”œβ”€β”€ server/          # Node.js/Express backend
β”œβ”€β”€ shared/          # Shared types and utilities
└── docs/           # Documentation

πŸ“‹ Requirements

  • Node.js 18+
  • NPM or Yarn
  • Environment variables (see .env.example)

πŸ› οΈ Development Setup

  1. Clone and install dependencies:

    git clone <repository-url>
    cd talecraft-ai
    npm run install:all
  2. Set up environment variables:

    cp server/.env.example server/.env
    # Edit server/.env with your API keys
  3. Start development servers:

    npm run dev

    This starts:

πŸ”§ Environment Variables

Create server/.env with:

HUGGING_FACE_TOKEN=your_hf_token
ELEVENLABS_API_KEY=your_elevenlabs_key
CLOUDFLARE_R2_ACCESS_KEY=your_r2_access_key
CLOUDFLARE_R2_SECRET_KEY=your_r2_secret_key
CLOUDFLARE_R2_BUCKET=your_bucket_name
CLOUDFLARE_R2_ENDPOINT=your_r2_endpoint

🎯 API Endpoints

Endpoint Method Description
/api/upload POST Upload character image
/api/generate POST Generate story and scenes
/api/status/:id GET Check generation status
/api/export/pdf POST Export as PDF
/api/voices GET Get available voices

🎬 Demo Timeline

  • Day 1: Character upload + DNA system
  • Day 2: Story engine with Mistral 7B
  • Day 3: Video pipeline with Wan-AI
  • Day 4: Voice narration + polish
  • Day 5: Demo preparation

About

Talecraft AI is a AI-powered Storytelling Web Application built for our hackathon entry to Futurehack 2025

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •