PROJECT / 2025
Retrofy
AI Image Editor
A modern, mobile-first AI-powered image editing application built with Next.js 15 and Google's Generative AI. Transform images with natural language prompts and maintain complete editing history with a custom retro/brutalist design system.
- stack
- Next.js 15 · TypeScript · Google Generative AI · Tailwind CSS · React 19 · PWA · Canvas API · Radix UI
How it works
image + prompt
resized in the browserGemini
edits the imagehistory
every version kept

01 / Overview
Retrofy is a sophisticated, mobile-first web application that leverages Google's Gemini 2.5 Flash Image Preview API to transform images through natural language prompts. Built with Next.js 15 and featuring a distinctive retro/brutalist design system, the application provides both text-to-image generation and image-to-image editing capabilities. The project demonstrates advanced client-server architecture patterns, real-time image processing, and comprehensive state management for professional-grade editing workflows.
02 / Key features
- –AI-Powered Image Editing - Transform images using natural language prompts powered by Google's Gemini 2.5 Flash Image Preview API
- –Mobile-First Design - Zero-scroll interface optimized for mobile devices with sticky action bars and touch-friendly 44px+ targets
- –Smart History Management - Visual thumbnail history with one-click revert functionality and a linear edit chain that is saved in the browser (last 50 edits)
- –Advanced Image Processing - Client-side image optimization, automatic compression, format conversion, and Canvas API integration for resizing
- –Multi-Image Support - Support for additional images in prompts, batch processing, and intelligent file size management
- –Custom Design System - Retro/brutalist UI with bold typography (Archivo Black, Space Grotesk), high contrast, and consistent 2px borders
- –Progressive Web App - PWA with service-worker caching, install prompts, and automatic update notifications
- –Real-time Processing - Server actions with React transitions for non-blocking UI updates and comprehensive loading states
- –Responsive Architecture - Resizable desktop panels and optimized mobile layout with separate interaction patterns
- –Production-Ready Features - Error boundaries, comprehensive error handling and TypeScript strict mode
03 / Challenges
- –Mobile-First Optimization - Creating a zero-scroll interface that works seamlessly across all device sizes while maintaining full functionality
- –AI API Integration - Implementing robust error handling for Google Gemini API including rate limits, safety filters, and content moderation
- –Image Processing Performance - Managing client-side image compression, resizing, and format conversion without blocking the UI
- –State Management Complexity - Handling complex editing history, image caching, blob URL management, and concurrent operations
- –Memory Management - Preventing memory leaks from blob URLs, image data, and history storage while maintaining smooth performance
- –Progressive Web App Implementation - Integrating PWA features and service-worker caching with an app that depends on server-side AI calls
04 / Solution
The application is built using Next.js 15 with App Router architecture and React 19 for cutting-edge performance. The AI integration uses Google's Gemini 2.5 Flash Image Preview API through server actions, ensuring secure API key management and optimized request handling. Client-side image processing leverages the HTML5 Canvas API for efficient resizing, compression, and format conversion before server upload. Key technical implementations include: - Custom blob URL manager for memory-efficient image handling and caching - Smart image history system with a linear workflow: reverting truncates later edits, and the history is persisted in localStorage - Advanced mobile-first responsive design with separate desktop and mobile interaction patterns - Progressive Web App implementation with next-pwa for service-worker caching and an install prompt - Custom retro/brutalist design system using Tailwind CSS with CSS custom properties - Comprehensive error handling covering API limits, safety filters, and processing failures - React Dropzone integration for drag-and-drop file uploads with extensive validation - Server action body limit raised to 25 MB so large images pass through, with images over 3 MB resized client-side first
05 / Outcome
Retrofy successfully demonstrates cutting-edge web technologies in a practical, user-focused application. The mobile-first approach ensures excellent usability across all devices, with the zero-scroll interface providing intuitive navigation. The AI integration reports API, rate-limit and safety-filter errors back to the user. The project showcases advanced React patterns including server actions, transitions, and modern state management techniques. The custom design system creates a distinctive visual identity that sets it apart from generic AI tools. The Progressive Web App implementation makes it installable, with service-worker caching and update notifications. Technical achievements include sophisticated image processing workflows, memory-efficient blob URL management, and error handling around uploads, resizing and the API. The application handles multiple image formats, intelligent resizing, and batch processing while maintaining smooth performance. The comprehensive history management system enables professional editing workflows with easy reversion capabilities. Built with the latest Next.js 15 and React 19 features, the project represents state-of-the-art web development practices including server actions and modern TypeScript patterns. Retrofy demonstrates expertise in AI integration, responsive design, image processing, and production deployment.