A professional AI-powered character asset generator built with Next.js, Recraft v3, and shadcn/ui components.
- ✅ Full Style Selection: Choose from Realistic Image, Digital Illustration, and Vector Illustration categories with 39+ individual styles
- ✅ Custom Color Palettes: Select up to 3 colors that influence the character's color scheme via Recraft API
- ✅ Smart Prompt Enhancement: Automatically enhances user input with our optimized CHARACTER_GENERATION_PROMPT
- ✅ Responsive Design: Mobile-first design that scales beautifully across all devices
- ✅ Accessibility-First: WCAG 2.2 compliant with proper focus management and contrast ratios
- ✅ Real-time Feedback: Toast notifications and animated loading states
- ✅ Professional Output: Cinema4D quality rendering with transparent backgrounds
- Node.js 18+
- npm or yarn
- Recraft API key (via AIML API)
AIML_API_KEY=your_aiml_api_key_here# Install dependencies
npm install
# Start development server
npm run dev- Navigate to
/canvas - Enter a character type (e.g., "panda", "dragon", "robot")
- Select style category (Realistic Image, Digital Illustration, Vector Illustration)
- Choose specific style from 39+ available options
- Customize color palette with up to 3 colors
- Select canvas size for your use case
- Click "Generate Character"
- Download your professional 3D asset
/app/canvas/
├── page.tsx # Main canvas page
├── components/
│ ├── generation-controls.tsx # Input form and generation controls
│ ├── image-display.tsx # Image display with loading states
│ └── style-selector.tsx # Style selection (future enhancement)
- Uses
#FF6633as defined in requirements - Integrated into Tailwind theme via CSS variables (oklch format)
- Applied to UI elements and passed to Recraft API for color influence
// Replaces "Axolotl" in CHARACTER_GENERATION_PROMPT with user input
const enhancedPrompt = CHARACTER_GENERATION_PROMPT.replace(
'Axolotl',
userPrompt.trim() || 'character'
)- Automatically uses
realistic_image/enterprisestyle - Shows preview thumbnail from recraft-styles.ts
- Professional 3D rendering optimized for commercial use
- Mobile:
< 640px- Stacked layout - Tablet:
640px - 1024px- Responsive grid - Desktop:
1024px+- Full sidebar + canvas layout
--primary: oklch(0.63 0.18 38.8); /* #FF6633 */animate-pulse-glow: Smooth pulsing effectanimate-float: Floating animation for iconsanimate-shimmer: Loading shimmer effectanimate-caret-blink: Cursor blinking animation
interface GenerationParams {
prompt: string // Enhanced with CHARACTER_GENERATION_PROMPT
style: string // e.g., 'realistic_image/enterprise', 'digital_illustration/pixel_art'
size: string // From RECRAFT_IMAGE_SIZE_OPTIONS
colors: Array<{ // Up to 3 colors for palette influence
r: number; // Red (0-255 integer)
g: number; // Green (0-255 integer)
b: number; // Blue (0-255 integer)
}>
}- User input enhanced with professional prompt template
- Primary color converted to RGB and integrated into prompt
- Request sent to
/api/images/generations - Response displays generated image with download capability
- ✅ Focus Management: Proper tab order and focus-visible styles
- ✅ Color Contrast: All text meets AA contrast ratios
- ✅ Semantic HTML: Proper heading hierarchy and landmarks
- ✅ Screen Reader: ARIA labels and descriptive alt text
- ✅ Keyboard Navigation: Full keyboard accessibility
focus-visible:ring-primary/20 focus-visible:border-ring- Style selector with multiple enterprise options
- Batch generation capabilities
- Custom color palette selection
- Asset export in multiple formats
- Generation history and favorites
- Advanced prompt customization
- Image optimization with Next.js Image component
- Lazy loading for style thumbnails
- Caching for repeated generations
- Progressive loading states
# Add new shadcn/ui components
npx shadcn@latest add [component-name]# Install axe-core for accessibility testing
npm install --save-dev @axe-core/react- TypeScript strict mode enabled
- ESLint configured with Next.js rules
- Tailwind CSS for consistent styling
- Add error boundaries for better error handling
- Implement proper loading states for network requests
- Add image compression for faster downloads
- Add keyboard shortcuts for common actions
- Implement undo/redo functionality
- Add generation presets for different use cases
- Add social sharing capabilities
- Implement user preferences/settings
- Add analytics for generation metrics
- Follow the existing code style and component patterns
- Ensure all new components are accessible (WCAG 2.2)
- Add proper TypeScript types for all props and functions
- Test on mobile, tablet, and desktop breakpoints
- Verify color contrast ratios for any new UI elements
Commercial license included with Recraft v3 enterprise features.