AI-powered image editing SaaS — generate images, remove backgrounds, restore faces, edit with overlays, and convert text to speech. Built with Next.js 16, Supabase, and Replicate AI.
View Demo
·
Report Bug
·
Request Feature
Table of Contents
Retouchly is a full-stack SaaS application for AI-powered image editing. Everything runs in a single Next.js monorepo — no separate backend. Users can generate images from text prompts, remove backgrounds, restore faces, edit images with AI overlays, and convert text to speech — all from a clean dark-themed interface.
| Tool | Description | Model |
|---|---|---|
| Image Generation | Generate images from text prompts | Flux AI (Replicate) |
| Background Remover | Remove image backgrounds automatically | Replicate AI |
| Face Restoration | Enhance and restore faces in photos | GFPGAN (Replicate) |
| Image Editor | Edit images with AI using natural language | Google nano-banana |
| Text to Speech | Convert text to natural-sounding speech | Kokoro AI |
- Explore Feed — Masonry grid of community-shared creations with Discover & Following tabs
- Follow System — Follow creators, see follower/following counts on profiles
- User Profiles — Public creator profiles with activity history
- Dashboard — Personal stats, recent creations, activity breakdown charts
- History — Full creation history with favorites, search, sort, grid/list view
- Settings — Profile editing, password change, plan info, danger zone
- AI Assistant — Floating chat assistant with tool-specific guidance (GPT-4o-mini + vision)
- Authentication — Email/password via Supabase Auth
- Pricing — Subscription plans via iyzipay (Turkish payment provider)
— App Router, Server Actions, API Routes
— v4 with CSS variables
— Global AI tool state
— Auth, PostgreSQL, Storage
— GPT-4o-mini for AI Assistant
— Image generation, restoration, background removal
- shadcn/ui — UI component library (new-york style)
- motion/react — Animations
- react-hook-form + zod — Form validation
- Node.js 18+
- npm
npm install npm@latest -g-
Clone the repo
git clone https://github.com/doganaybalaban/Retouchly.git cd Retouchly -
Install dependencies
npm install
-
Set up environment variables (see Environment Variables)
cp .env.example .env.local
-
Start the development server
npm run dev
make dev # Start with Docker Compose
make build # Build Docker image
make stop # Stop containers
make health # Check /api/healthsrc/
├── app/
│ ├── (tools)/ # AI tool pages
│ │ ├── image-generation/
│ │ ├── background-remover/
│ │ ├── face-restoration/
│ │ ├── image-overlay/
│ │ └── text-to-speech/
│ ├── actions/ # Server Actions (AI calls, DB writes)
│ ├── api/ # API Routes (color-matcher, health)
│ ├── dashboard/ # User dashboard
│ ├── explore/ # Community feed
│ ├── history/ # Creation history
│ ├── settings/ # Account settings
│ ├── profile/[id]/ # Public creator profiles
│ └── pricing/ # Subscription plans
├── components/
│ ├── ai-assistant/ # Floating AI chat assistant
│ ├── background-remove/
│ ├── face-restoration/
│ ├── image-generation/
│ ├── image-overlay/
│ ├── text-to-speech/
│ └── ui/ # shadcn/ui primitives
├── store/
│ └── useGeneratedStore.ts # Zustand global store
└── lib/
├── supabase.ts
├── openai.ts
└── follow-client.ts
Copy .env.example to .env.local and fill in the values:
OPENAI_API_KEY=
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
REPLICATE_API_TOKEN=
IYZICO_API_KEY=
IYZICO_API_SECRET=
IYZICO_BASE_URL=| Variable | Description |
|---|---|
OPENAI_API_KEY |
OpenAI API key for the AI assistant (GPT-4o-mini) |
NEXT_PUBLIC_SUPABASE_URL |
Supabase project URL |
NEXT_PUBLIC_SUPABASE_ANON_KEY |
Supabase anonymous key |
REPLICATE_API_TOKEN |
Replicate API token for image AI models |
IYZICO_API_KEY |
iyzipay payment API key |
IYZICO_API_SECRET |
iyzipay payment secret |
IYZICO_BASE_URL |
iyzipay base URL (sandbox or production) |
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt for more information.
Doğanay Balaban — balabandoganay@gmail.com
Project Link: https://github.com/doganaybalaban/Retouchly








