An AI-powered pixel art generator built with Next.js and shadcn/ui, featuring a comprehensive pixel art editor with advanced tools and real AI generation capabilities.
- Replicate API: Powered by specialized pixel art models for authentic pixel art creation
- Smart Prompt Processing: Describe your pixel art idea and watch AI bring it to life
- Multiple Canvas Sizes: Choose from preset sizes (16x16 to 256x256) or create custom dimensions
- Real-time Generation: Watch as your pixel art is generated with AI processing
- High Quality: Uses optimized models specifically trained for pixel art
- Full-Screen Editor: Click on generated art to enter a professional pixel art editor
- Multiple Tools: Brush, eraser, and eyedropper tools for precise editing
- Brush Sizes: Adjustable brush size from 1x1 to 5x5 pixels
- Color Palette: Extensive color palette with custom color picker
- Undo/Redo: Full history support with unlimited undo/redo operations
- Canvas Controls: Zoom in/out, toggle grid, and rotate canvas
- Fill Tools: Fill white areas or clear entire canvas
- Dark Theme: Beautiful dark interface optimized for pixel art creation
- Responsive Design: Works seamlessly on desktop and tablet devices
- Toast Notifications: User-friendly feedback for all actions
- Keyboard Shortcuts: Efficient workflow with keyboard support
- shadcn/ui Components: Modern, accessible UI components
- High-Quality Export: Download pixel art as PNG with 4x scaling
- Share Functionality: Share your creations via native sharing or clipboard
- Save Progress: Save your edited pixel art and continue later
- Node.js 18+
- pnpm (recommended) or npm
- Replicate API token (for AI generation)
- Clone the repository:
git clone https://github.com/yourusername/doolo-pixel-generator.git
cd doolo-pixel-generator- Install dependencies:
pnpm install
# or
npm install- Set up environment variables:
# Create .env.local file
echo "REPLICATE_API_TOKEN=your_replicate_token_here" > .env.local-
Configure AI API:
- Get your Replicate API token from https://replicate.com/account/api-tokens
- Add your token to
.env.local
-
Run the development server:
pnpm dev
# or
npm run dev- Open http://localhost:3001 in your browser.
- Go to Replicate and create an account
- Go to Account > API Tokens
- Create a new API token
- Add the token to your
.env.localfile
# Required for AI generation
REPLICATE_API_TOKEN=your_replicate_token_here- Specialized Models: Uses models specifically trained for pixel art
- High Quality: Optimized for pixel art generation
- Fast generation: Cloud-based processing for quick results
- Fallback mode: If no API token is configured, uses local seeded generation
- Select Canvas Size: Choose from preset sizes or enter custom dimensions
- Write Your Prompt: Describe your pixel art idea in detail
- Generate with AI: Click "Generate with AI" and wait for the pixel art model to create your art
- View Result: Your AI-generated pixel art will appear in the main area
- Open Editor: Click the edit button on your generated art
- Choose Tools: Select brush, eraser, or eyedropper from the toolbar
- Pick Colors: Use the color picker or palette to select colors
- Adjust Settings: Modify brush size, zoom level, and grid visibility
- Edit Freely: Click and drag to paint, use keyboard shortcuts for efficiency
- Save Changes: Click save to preserve your edits
B- Switch to brush toolE- Switch to eraser toolI- Switch to eyedropper toolCtrl+Z- UndoCtrl+Y- RedoCtrl+S- Save+- Zoom in-- Zoom outG- Toggle grid
- Framework: Next.js 14 with App Router
- Language: TypeScript
- Styling: Tailwind CSS
- UI Components: shadcn/ui
- Icons: Lucide React
- Notifications: Custom toast system
- Canvas: Custom pixel grid implementation
- Package Manager: pnpm
- AI Generation: Replicate Pixel Art Models
doolo-pixel-generator/
βββ app/ # Next.js app directory
β βββ api/ # API routes
β β βββ generate/ # AI generation endpoint
β βββ globals.css # Global styles with shadcn/ui
β βββ layout.tsx # Root layout
β βββ page.tsx # Main page
βββ components/ # React components
β βββ ui/ # shadcn/ui components
β β βββ button.tsx # Button component
β β βββ input.tsx # Input component
β β βββ textarea.tsx # Textarea component
β β βββ slider.tsx # Slider component
β β βββ card.tsx # Card component
β β βββ toast.tsx # Toast component
β β βββ toaster.tsx # Toaster component
β βββ Sidebar.tsx # Generation controls
β βββ PixelArtDisplay.tsx # Art display component
β βββ PixelArtEditor.tsx # Full-screen editor
βββ hooks/ # Custom hooks
β βββ use-toast.ts # Toast hook
βββ lib/ # Utility functions
β βββ utils.ts # shadcn/ui utilities
βββ types/ # TypeScript definitions
β βββ index.ts # Type definitions
βββ package.json # Dependencies and scripts
βββ README.md # Project documentation
- Button: Primary action buttons with variants
- Input: Form input fields
- Textarea: Multi-line text input
- Slider: Range input for brush size
- Card: Content containers with headers
- Toast: Notification system
- Toaster: Toast container and provider
- Prompt Processing: Your text prompt is sent to Replicate's pixel art models
- AI Generation: Specialized models generate high-quality pixel art images
- Image Processing: The image is converted to a pixel art grid on the client side
- Fallback: If API fails, a seeded color palette is used
- Editor Ready: The final pixel art is ready for editing
- Model: Pixel Art Diffusion (specialized for pixel art)
- Output: High-quality pixel art images
- Style: Authentic pixel art aesthetic
- Quality: Optimized for pixel art generation
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by classic pixel art tools and modern AI art generators
- Built with love for the pixel art community
- Special thanks to all contributors and users
- Powered by shadcn/ui for beautiful, accessible components
- AI generation powered by Replicate Pixel Art Models
If you encounter any issues or have questions, please:
- Check the Issues page
- Create a new issue with detailed information
- Join our community discussions
Happy AI Pixel Art Creating! π¨β¨π€