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!
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
-
Clone the repository
git clone https://github.com/yourusername/ghibli-style-converter.git cd ghibli-style-converter -
Install dependencies
npm install
-
Set up environment variables
Create a
.env.localfile 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.
-
Run the development server
npm run dev
-
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:fixVSCode 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
- Update URLs in
/app/layout.tsx,/app/sitemap.ts, and/public/robots.txtwith your actual domain - Create icons (favicon, PWA icons) - see SEO_CHECKLIST.md
- Test structured data with Google Rich Results Test
- 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
- Inspired by the beautiful art style of Studio Ghibli
Made with โค๏ธ and a sprinkle of Totoro magic
