Skip to content

DoganayBalaban/Retouchly

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

Retouchly

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
  1. About The Project
  2. Features
  3. Built With
  4. Getting Started
  5. Project Structure
  6. Environment Variables
  7. Contributing
  8. License
  9. Contact

About The Project

Retouchly Demo

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.

Main Page

(back to top)


Features

AI Tools

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

Platform

  • 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)

Background Remover Image Generator Face Restoration Image Editor History Explore Pricing

(back to top)


Built With

  • Next — App Router, Server Actions, API Routes
  • React
  • TailwindCSS — v4 with CSS variables
  • Zustand — Global AI tool state
  • Supabase — Auth, PostgreSQL, Storage
  • OpenAI — GPT-4o-mini for AI Assistant
  • Replicate — Image generation, restoration, background removal
  • shadcn/ui — UI component library (new-york style)
  • motion/react — Animations
  • react-hook-form + zod — Form validation

(back to top)


Getting Started

Prerequisites

  • Node.js 18+
  • npm
npm install npm@latest -g

Installation

  1. Clone the repo

    git clone https://github.com/doganaybalaban/Retouchly.git
    cd Retouchly
  2. Install dependencies

    npm install
  3. Set up environment variables (see Environment Variables)

    cp .env.example .env.local
  4. Start the development server

    npm run dev

Docker

make dev      # Start with Docker Compose
make build    # Build Docker image
make stop     # Stop containers
make health   # Check /api/health

(back to top)


Project Structure

src/
├── 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

(back to top)


Environment Variables

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)

(back to top)


Contributing

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)


License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)


Contact

Doğanay Balaban — balabandoganay@gmail.com

Project Link: https://github.com/doganaybalaban/Retouchly

(back to top)


Acknowledgments

(back to top)

About

Retouchly, yapay zekanın gücünü kullanarak fotoğraflarına sihirli bir dokunuş yapabileceğiniz bir uygulamadır.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages