GitHunt
HA

halilatilla/ghibli-style-converter

Transform yourself into a Studio Ghibli character using AI. Upload your photo and become a Miyazaki-style anime character from Spirited Away, Totoro, Howl's Moving Castle, Princess Mononoke, or Kiki's Delivery Service. Built with Next.js 16, React 19, and Google Gemini AI.

๐ŸŽจ GhibliStyle Converter

Transform yourself into a Studio Ghibli character using AI. Create stunning images or animated videos as a Miyazaki anime character from your favorite films!

Next.js
React
TypeScript
Tailwind CSS

CleanShot 2025-12-30 at 18 50 34

CleanShot.2025-12-30.at.19.01.12-converted.mp4
ghibli-video-1767110414052.mp4

โœจ Features

Core Features

  • ๐ŸŽจ Authentic Ghibli Design - UI inspired by Studio Ghibli's iconic visual style
  • ๐ŸŽญ 5 Character Styles - Transform into characters from Spirited Away, Totoro, Howl's Moving Castle, Princess Mononoke, and Kiki's Delivery Service
  • ๐Ÿ–ผ๏ธ Drag & Drop Upload - Easy photo upload with drag and drop support
  • ๐Ÿค– AI-Powered Transformations - Turn yourself into a Miyazaki anime character
  • โœ๏ธ Custom Prompts - Fine-tune your character style with custom prompts or use presets
  • ๐Ÿ’พ One-Click Download - Download your creations instantly
  • ๐ŸŒŠ Watercolor Effects - Hand-drawn textures and soft gradients throughout
  • โœจ Magical Animations - Floating particles, gentle glows, and organic movements
  • ๐Ÿ“ฑ Responsive Design - Works beautifully on desktop and mobile
  • ๐Ÿ›ก๏ธ Rate Limiting - Built-in protection with Upstash Redis
  • ๐Ÿ” SEO Optimized - Comprehensive meta tags, Open Graph, and structured data

๐ŸŽฌ NEW: Video Generation

  • Animated Ghibli Videos - Create 8-second animated videos using Google's Veo 3.1 AI
  • Cinematic Animations - Watch your character come to life with smooth, natural movements
  • Movie-Specific Scenes - Each film theme has unique animation prompts and settings
  • 720p HD Quality - High-quality MP4 videos ready to share
  • Real-Time Progress - Track video generation with live status updates
  • Fast Processing - Videos ready in 1-3 minutes

Two Modes Available

  • ๐Ÿ“ธ Transform Photo - Generate stunning Ghibli-style images in 5-15 seconds
  • ๐ŸŽฌ Create Video - Generate 8-second animated videos in 1-3 minutes

๐Ÿš€ Getting Started

Prerequisites

  • Node.js 18+

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/ghibli-style-converter.git
    cd ghibli-style-converter
  2. Install dependencies

    npm install
  3. Set up environment variables

    Create a .env.local file in the root directory:

    # Required - Must have access to Gemini image generation AND Veo video models
    GEMINI_API_KEY=your_gemini_api_key
    
    # Optional - for production rate limiting
    UPSTASH_REDIS_REST_URL=your_upstash_url
    UPSTASH_REDIS_REST_TOKEN=your_upstash_token

    Note: Video generation requires access to Google's Veo 3.1 model, which may be in limited preview. Request access from Google AI Studio if needed.

  4. Run the development server

    npm run dev
  5. Open your browser

    Navigate to http://localhost:3000

๐Ÿงน Code Quality

This project uses Biome for linting and formatting. Available commands:

# Check code for issues (lint + format check)
npm run check

# Check and auto-fix issues
npm run check:fix

# Format all files
npm run format

# Lint only
npm run lint

# Lint and auto-fix
npm run lint:fix

VSCode Integration

The project includes VSCode settings that enable:

  • โœ… Format on save
  • โœ… Auto-fix on save
  • โœ… Organize imports on save

Install the Biome VSCode extension for the best experience.

๐Ÿ› ๏ธ Tech Stack

Technology Version Purpose
Next.js 16 React framework
React 19 UI library
TypeScript 5.9 Type safety
Tailwind CSS 4 Styling
Biome 2.3 Linting & Formatting
Framer Motion - Animations
Google Gemini AI - Image & Video AI
Google Veo 3.1 - Video generation
Google Fonts - Quicksand & Caveat
Upstash - Rate limiting
Lucide React - Icons

๐Ÿ“ Project Structure

ghibli-style-converter/
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ api/
โ”‚   โ”‚   โ”œโ”€โ”€ generate/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ route.ts          # Image generation API endpoint
โ”‚   โ”‚   โ””โ”€โ”€ generate-video/
โ”‚   โ”‚       โ””โ”€โ”€ route.ts          # Video generation API endpoint (NEW)
โ”‚   โ”œโ”€โ”€ globals.css
โ”‚   โ”œโ”€โ”€ layout.tsx
โ”‚   โ””โ”€โ”€ page.tsx                  # Main app page with photo/video modes
โ”œโ”€โ”€ components/
โ”‚   โ”œโ”€โ”€ ui/                       # Reusable UI components
โ”‚   โ”œโ”€โ”€ GhibliBackground.tsx      # Animated backgrounds
โ”‚   โ”œโ”€โ”€ Header.tsx
โ”‚   โ”œโ”€โ”€ ImageUploader.tsx         # Photo upload component
โ”‚   โ””โ”€โ”€ VideoUploader.tsx         # Video upload component (NEW)
โ”œโ”€โ”€ lib/
โ”‚   โ””โ”€โ”€ utils.ts
โ””โ”€โ”€ ...config files

๐ŸŽจ Design Philosophy

This project captures the essence of Studio Ghibli's visual language:

  • Authentic Color Palettes - Film-accurate colors from each Ghibli movie
  • Watercolor Textures - Soft, hand-painted feel with organic gradients
  • Dappled Lighting - Signature Ghibli light filtering effects
  • Organic Shapes - Rounded corners and flowing animations
  • Whimsical Details - Floating particles, gentle glows, and magical touches
  • Hand-drawn Typography - Caveat font for that authentic handwritten feel

Character Style Themes

Each character style captures the essence of iconic Ghibli films:

Photo Mode

  • Spirited Away ๐ŸŒธ - Magical and whimsical characters with expressive features
  • Totoro Adventure ๐ŸŒณ - Innocent and cheerful countryside style
  • Howl's Moving Castle โœจ - Elegant Victorian-era characters with flowing details
  • Princess Mononoke ๐Ÿบ - Fierce warrior aesthetic with bold colors
  • Kiki's Delivery Service ๐Ÿงน - Youthful and optimistic character design

Video Mode

  • Spirited Away ๐ŸŒธ - Character in mystical bathhouse with floating spirits
  • Totoro Adventure ๐ŸŒณ - Character in sunlit forest with falling leaves
  • Howl's Moving Castle โœจ - Elegant character with magical sparkles and flowing movement
  • Princess Mononoke ๐Ÿบ - Warrior in forest with mystical spirits
  • Kiki's Delivery Service ๐Ÿงน - Cheerful character with gentle breeze animation

๐Ÿ’ก Usage Tips

For Photo Mode ๐Ÿ“ธ

  • Clear, front-facing portraits work best for character transformation
  • Ensure your photo is well-lit with visible facial features
  • Try the "Spirited Away" preset for classic Miyazaki character style
  • Headshots or selfies produce the most detailed anime character results
  • Experiment with different character style prompts for unique looks
  • Natural lighting photos give the best hand-drawn aesthetic
  • Processing time: 5-15 seconds

For Video Mode ๐ŸŽฌ

  • Use the same high-quality photos as photo mode for best results
  • Video generation takes 1-3 minutes - don't close the window!
  • Each movie theme creates unique animated scenes
  • Videos are 8 seconds long at 720p HD quality
  • Perfect for social media sharing and profile videos
  • Watch the real-time progress updates during generation

๐Ÿ”’ Rate Limiting

The API includes built-in rate limiting to manage costs:

Photo Generation

  • 5 requests per minute per user
  • 30 images per day globally
  • Uses Upstash Redis in production
  • Falls back to in-memory limiting for development

Video Generation

  • 2 requests per hour per user (more restrictive due to cost)
  • 10 videos per day globally
  • 5-minute timeout protection
  • Separate rate limit tracking from photos

Note: Video generation is significantly more expensive than image generation (~$0.20-0.50 per video vs ~$0.01 per image), hence the stricter limits.

๐Ÿ” SEO Features

This project is fully optimized for search engines:

  • โœ… Comprehensive Metadata - Title, description, keywords, and more
  • โœ… Open Graph Tags - Rich social media previews
  • โœ… Twitter Cards - Optimized Twitter sharing
  • โœ… JSON-LD Structured Data - WebApplication, FAQPage, and Breadcrumbs
  • โœ… Dynamic OG Image - Auto-generated Open Graph images
  • โœ… Sitemap - Dynamic sitemap generation
  • โœ… Robots.txt - Proper crawler instructions
  • โœ… PWA Manifest - Progressive Web App support
  • โœ… Mobile-First - Responsive and mobile-optimized

SEO Setup

  1. Update URLs in /app/layout.tsx, /app/sitemap.ts, and /public/robots.txt with your actual domain
  2. Create icons (favicon, PWA icons) - see SEO_CHECKLIST.md
  3. Test structured data with Google Rich Results Test
  4. Submit sitemap to Google Search Console

For detailed SEO documentation, see SEO.md and SEO_CHECKLIST.md.

๐Ÿ“ License

This project is open source and available under the MIT License.

๐Ÿ™ Acknowledgments


Made with โค๏ธ and a sprinkle of Totoro magic

halilatilla/ghibli-style-converter | GitHunt