Release Version: (v1.0)
Join the Vibe Coding is Life Skool Community and get a 1-click β‘Bolt.new installation clone of this app, plus access to live build sessions, exclusive project downloads, AI prompts, masterclasses, and the best vibe coding community on the web!
Professional AI Image Generation & Conversational Editing Platform
A production-ready React + TypeScript application for delightful image generation and conversational, region-aware revisions using Google's Gemini 2.5 Flash Image model. Built with modern web technologies and designed for both creators and developers.
π Try the LIVE Demo
- Text-to-Image Generation - Create stunning images from descriptive prompts
- Live Quality Tips - Real-time feedback to improve your prompts
- Reference Image Support - Use up to 2 reference images to guide generation
- Advanced Controls - Fine-tune creativity levels and use custom seeds
- Conversational Editing - Modify images using natural language instructions
- Region-Aware Selection - Paint masks to target specific areas for editing
- Style Reference Images - Upload reference images to guide editing style
- Non-Destructive Workflow - All edits preserve the original image
- Interactive Canvas - Zoom, pan, and navigate large images smoothly
- Brush Tools - Variable brush sizes for precise mask painting
- Mobile Optimized - Responsive design that works beautifully on all devices
- Keyboard Shortcuts - Efficient workflow with hotkeys
- Generation History - Track all your creations and edits
- Variant Comparison - Generate and compare multiple versions side-by-side
- Full Undo/Redo - Complete generation tree with branching history
- Asset Management - Organized storage of all generated content
- SynthID Watermarking - Built-in AI provenance with invisible watermarks
- Offline Caching - IndexedDB storage for offline asset access
- Type Safety - Full TypeScript implementation with strict typing
- Performance Optimized - React Query for efficient state management
- Node.js 18+
- A Google AI Studio API key
-
Clone and install dependencies:
git clone <repository-url> cd nano-banana-image-editor npm install
-
Configure environment:
cp .env.example .env # Add your Gemini API key to VITE_GEMINI_API_KEY
-
Start development server:
npm run dev
-
Open in browser: Navigate to
http://localhost:5173
- Select Generate mode
- Write a detailed prompt describing your desired image
- Optionally upload reference images (max 2)
- Adjust creativity settings if needed
- Click Generate or press
Cmd/Ctrl + Enter
- Switch to Edit mode
- Upload an image or use a previously generated one
- Optionally paint a mask to target specific areas
- Describe your desired changes in natural language
- Click Apply Edit to see the results
- Use Select mode to paint precise masks for targeted edits
- Compare variants in the History panel
- Download high-quality PNG outputs
- Use keyboard shortcuts for efficient navigation
Shortcut | Action |
---|---|
Cmd/Ctrl + Enter |
Generate/Apply Edit |
Shift + R |
Re-roll variants |
E |
Switch to Edit mode |
G |
Switch to Generate mode |
M |
Switch to Select mode |
H |
Toggle history panel |
P |
Toggle prompt panel |
- Frontend: React 18, TypeScript, Tailwind CSS
- State Management: Zustand for app state, React Query for server state
- Canvas: Konva.js for interactive image display and mask overlays
- AI Integration: Google Generative AI SDK (Gemini 2.5 Flash Image)
- Storage: IndexedDB for offline asset caching
- Build Tool: Vite for fast development and optimized builds
src/
βββ components/ # React components
β βββ ui/ # Reusable UI components (Button, Input, etc.)
β βββ PromptComposer.tsx # Prompt input and tool selection
β βββ ImageCanvas.tsx # Interactive canvas with Konva
β βββ HistoryPanel.tsx # Generation history and variants
β βββ Header.tsx # App header and navigation
β βββ InfoModal.tsx # About modal with links
βββ services/ # External service integrations
β βββ geminiService.ts # Gemini API client
β βββ cacheService.ts # IndexedDB caching layer
β βββ imageProcessing.ts # Image manipulation utilities
βββ store/ # Zustand state management
β βββ useAppStore.ts # Global application state
βββ hooks/ # Custom React hooks
β βββ useImageGeneration.ts # Generation and editing logic
β βββ useKeyboardShortcuts.ts # Keyboard navigation
βββ utils/ # Utility functions
β βββ cn.ts # Class name utility
β βββ imageUtils.ts # Image processing helpers
βββ types/ # TypeScript type definitions
βββ index.ts # Core type definitions
VITE_GEMINI_API_KEY=your_gemini_api_key_here
- Model:
gemini-2.5-flash-image-preview
- Output Format: 1024Γ1024 PNG with SynthID watermarks
- Input Formats: PNG, JPEG, WebP
- Temperature Range: 0-1 (0 = deterministic, 1 = creative)
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLint
- API Security: Implement backend proxy for API calls in production
- Rate Limiting: Add proper rate limiting and usage quotas
- Authentication: Consider user authentication for multi-user deployments
- Storage: Set up cloud storage for generated assets
- Monitoring: Add error tracking and analytics
Copyright Β© 2025 Mark Fulton
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
- β Free to use for personal and commercial projects
- β Modify and distribute with proper attribution
β οΈ Share modifications - Any changes must be shared under the same licenseβ οΈ Network use - If you run this as a web service, you must provide source code
See the LICENSE file for full details.
We welcome contributions! Please:
- Follow the established patterns - Keep components under 200 lines
- Maintain type safety - Use TypeScript strictly with proper definitions
- Test thoroughly - Ensure keyboard navigation and accessibility
- Document changes - Update README and add inline comments
- Respect the license - All contributions will be under AGPL-3.0
- Creator: Mark Fulton
- AI Training Program: Reinventing.AI
- Community: Vibe Coding is Life Skool
- Google AI Studio: Get your API key
- Gemini API Docs: Official Documentation
- Client-side API calls - Currently uses direct API calls (implement backend proxy for production)
- Browser compatibility - Requires modern browsers with Canvas and WebGL support
- Rate limits - Subject to Google AI Studio rate limits
- Image size - Optimized for 1024Γ1024 outputs (Gemini model output dimensions may vary)
- Backend API proxy implementation
- User authentication and project sharing
- Advanced brush tools and selection methods
- Plugin system for custom filters
- Integration with cloud storage providers
Built by Mark Fulton | Powered by Gemini 2.5 Flash Image | Made with Bolt.new