First thanks Rayinf, for the first version 🙏, who inspire this one.
Transform your photos into Bangboo characters using AI - inspired by Zenless Zone Zero.
Bangboo Factory is a creative web application powered by Google Gemini 3 Pro that reimagines any photo as a collectible "Bangboo" character with customizable moods and art styles.
- Image-to-Bangboo Conversion: Upload any photo and AI transforms it into a unique Bangboo character
- Mood Customization: Choose from multiple expressions (Original, Happy, Grumpy, Combat Ready, Sleepy)
- Render Styles:
- 3D Cel-Shaded: Matches the Zenless Zone Zero visual aesthetic with clean outlines and vibrant colors
- Flat 2D: Clean vector art style with simplified shapes and colors
- Secure API Layer: Gemini API key stays server-side, never exposed to client
- Rate Limiting: Built-in protection (10 requests per minute per IP)
- Modern UI: Game-inspired interface with CRT overlay effects and smooth animations
- Frontend: React 19, TypeScript, Tailwind CSS v4
- Backend: Next.js 16 (App Router), Node.js
- AI: Google Gemini 3 Pro API
- Build: Turbopack (via Next.js)
- Styling: Tailwind CSS v4 (CSS-first), Google Fonts
- Node.js 18+ (or Bun)
- npm/yarn/pnpm (or Bun)
- Google Gemini API key (Get one here)
-
Clone the repository
git clone https://github.com/Maxvyr/bamboo.git cd bamboo -
Install dependencies
bun install
-
Create environment file
cp .env.local.example .env.local
Then edit
.env.localand add your Gemini API key:GEMINI_API_KEY=your_api_key_here
-
Start development server
bun run dev
-
Open in browser Navigate to
http://localhost:3000
- Upload Image: Drag and drop or click to select a photo
- Configure Settings:
- Select a mood for the Bangboo's expression
- Choose a render style (3D or Flat 2D)
- Generate: Click "Start Construction" to generate
- Download: Save your Bangboo character once generation completes
- Gemini API key is never exposed to the client
- All API calls are proxied through the backend
/api/generateroute - Environment variables are server-side only
- 10 requests per minute per IP address
- In-memory rate limiter to prevent abuse
- Returns 429 status when limit exceeded
- Image type validation (PNG, JPEG, WebP, GIF)
- Mood and style option validation
- Request body size limit (10MB)
User Browser
↓ (upload image + mood/style)
Next.js Frontend (app/page.tsx)
↓ (POST /api/generate)
API Route (app/api/generate/route.ts)
├─ Check rate limit
├─ Validate input
├─ Check Gemini API key
└─ Call Gemini 3 Pro
↓ (multimodal prompt)
Google Gemini API
↓ (generated image)
API Route → Frontend
↓
Display & Download
| File | Purpose |
|---|---|
app/page.tsx |
Main UI component (client-side) |
app/api/generate/route.ts |
Secure API endpoint for image generation |
lib/geminiService.ts |
Server-side Gemini API client |
lib/rateLimit.ts |
Rate limiter implementation |
services/api.ts |
Client-side API wrapper |
constants.ts |
Prompts and configuration |
components/ |
Reusable UI components |
The core magic happens in the Bangboo transformation prompt (constants.ts):
-
Anatomical specifications: Defines the exact Bangboo body structure
- Tiny short arms (no elbows)
- Bean-shaped cylindrical body
- Black screen face with yellow ring eyes
- Rabbit-like mechanical ears
-
Creative adaptation: Analyzes input to assign roles and create unique props
- Function detection (gamer, chef, artist, etc.)
- Unique prop generation (tools, weapons, attachments)
- Style translations (hats → helmet modifications, etc.)
-
Style keywords: Different styling instructions for 3D vs 2D modes
Generate a Bangboo character from an image.
Request:
{
"userImageBase64": "data:image/png;base64,...",
"mimeType": "image/png",
"mood": "happy",
"style": "3d",
"referenceImageBase64": "data:image/png;base64,..." // optional
}Response:
{
"imageUrl": "data:image/png;base64,..."
}Rate Limit Headers:
X-RateLimit-Remaining: Requests left in current windowX-RateLimit-Reset: Seconds until rate limit resets (on 429)
Status Codes:
200: Success400: Invalid input (bad image type, mood, or style)429: Rate limit exceeded500: Server error (API key missing or Gemini API error)
bun run build
bun startvercel deployMake sure to set GEMINI_API_KEY in your Vercel environment variables.
- Original Match (😐): Default expression matching the input
- Hyper Happy (😆): Excited, joyful expression
- Grumpy/Serious (😠): Stern, determined expression
- Combat Ready (⚔️): Battle-ready stance
- Lazy/Sleepy (💤): Relaxed, sleepy mood
- 3D Cel-Shaded: Zenless Zone Zero-inspired 3D render
- Flat 2D: Clean vector art illustration
bun run dev # Start dev server (http://localhost:3000)
bun run build # Production build
bun run start # Start production server
bun run lint # Run ESLintbamboo/
├── app/ # Next.js App Router
│ ├── api/generate/ # API route
│ ├── layout.tsx # Root layout
│ ├── page.tsx # Home page
│ └── globals.css # Global styles
├── components/ # React components
├── lib/ # Server-side utilities
├── public/ # Static assets
├── services/ # Client-side utilities
├── constants.ts # Config & prompts
├── types.ts # TypeScript types
└── CLAUDE.md # Developer guide
- Check
.env.localexists and containsGEMINI_API_KEY - Verify the API key is valid on Google Cloud Console
- Wait 60 seconds before trying again
- Check
X-RateLimit-Resetheader for exact reset time
- Gemini 3 Pro can take 10-30 seconds depending on complexity
- Check network tab in browser dev tools
Contributions welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is open source and licensed under the MIT License.
This is a fan-made project and is not affiliated with HoYoverse or Zenless Zone Zero. All Zenless Zone Zero assets and characters are property of HoYoverse.
- AI: Powered by Google Gemini 3 Pro
- Framework: Built with Next.js
- Styling: Tailwind CSS
- Icons: Lucide React
- Inspiration: Zenless Zone Zero
Made with ❤️ by fans, for fans.