Version 0.2.0 - August 2025
AutoEditAI is an AI-powered Photoshop assistant that automates image edits requested on Reddit's r/PhotoshopRequest using Google's Gemini AI models.
0902.1.mp4
- Automated Reddit Integration: Fetches new posts from r/PhotoshopRequest with image attachments
- AI-Powered Request Parsing: Uses Gemini 2.5 Flash to parse natural language requests into structured edit forms
- Intelligent Image Editing: Leverages AutoEditAI (Gemini 2.5 Flash Image Preview) for automated image processing
- Modern Dashboard UI: Clean, responsive interface built with Next.js and shadcn/ui
- Before/After Comparison: Side-by-side or slider view for comparing edits
- Download & Export: Easy download of processed images
- Processing History: Track all completed and failed requests
- Frontend: Next.js 14 (App Router) + TypeScript + TailwindCSS
- UI Components: shadcn/ui + Radix UI
- Backend: Next.js API Routes (Edge Runtime)
- Reddit API: snoowrap (JavaScript Reddit API client)
- AI Models:
- Gemini 2.5 Flash โ Text parsing and request understanding
- AutoEditAI (Gemini 2.5 Flash Image Preview) โ Image editing and generation
- Icons: Lucide React
- Fetch โ Reddit posts with images from r/PhotoshopRequest
- Parse โ Extract request text and convert to structured edit form using Gemini
- Edit โ Process images using AutoEditAI with the generated edit form
- Display โ Show before/after results in the dashboard
- Node.js 18+
- npm or yarn
- Google AI API key (for Gemini models)
- Reddit API credentials (optional - uses mock data if not configured)
- Clone and install dependencies:
git clone <repository-url>
cd autoeditai
npm install
- Configure environment variables:
Create a .env.local
file in the root directory:
# Google AI (Gemini) Configuration
GOOGLE_AI_API_KEY=your_google_ai_api_key_here
# Reddit API Configuration (optional - uses mock data if not set)
REDDIT_CLIENT_ID=your_reddit_client_id
REDDIT_CLIENT_SECRET=your_reddit_client_secret
REDDIT_USERNAME=your_reddit_username
REDDIT_PASSWORD=your_reddit_password
# Optional: Storage Configuration (for later)
AWS_ACCESS_KEY_ID=your_aws_access_key
AWS_SECRET_ACCESS_KEY=your_aws_secret_key
AWS_S3_BUCKET=your_s3_bucket_name
- Start the development server:
npm run dev
- Open your browser: Navigate to http://localhost:3000
- Visit Google AI Studio
- Create a new API key
- Add it to your
.env.local
file
- Go to Reddit Apps
- Create a new application (type: script)
- Note your Client ID and Client Secret
- Add Reddit credentials to
.env.local
Note: If Reddit credentials are not configured, the app will use mock data for demonstration.
The app has three main sections:
- Queue - View and process new Reddit requests
- Editor - Review before/after comparisons
- History - Browse processed requests
- Fetch Posts: Click "Refresh Posts" in the Queue tab
- Select Request: Browse available posts with images
- Parse & Edit: Click the "Parse & Edit" button on any post
- Review Results: Switch to Editor tab to see the processed image
- Download: Save the edited image to your device
The AI parses requests into this structured format:
{
"task_type": "object_removal",
"instructions": "Remove the man in the background",
"objects_to_remove": ["man in background"],
"objects_to_add": [],
"style": "realistic",
"mask_needed": true
}
autoeditai/
โโโ src/
โ โโโ app/ # Next.js app router
โ โ โโโ api/ # API routes
โ โ โ โโโ reddit/ # Reddit integration
โ โ โ โโโ gemini/ # AI processing
โ โ โโโ globals.css # Global styles
โ โ โโโ layout.tsx # Root layout
โ โ โโโ page.tsx # Landing page
โ โ โโโ app/ # Dashboard pages
โ โโโ components/ # React components
โ โ โโโ ui/ # shadcn/ui components
โ โ โโโ queue-view.tsx # Reddit posts queue
โ โ โโโ editor-view.tsx # Image editor/comparison
โ โ โโโ history-view.tsx # Processing history
โ โโโ lib/ # Utilities and services
โ โ โโโ database.ts # Supabase integration
โ โ โโโ auth-context.tsx # Authentication
โ โ โโโ utils.ts # Helper functions
โ โโโ types/ # TypeScript definitions
โ โโโ index.ts # Type definitions
โโโ vercel.json # Vercel deployment config
โโโ .vercelignore # Files to exclude from Vercel build
โโโ supabase-schema.sql # Database schema (reference)
โโโ README.md # Project documentation
GET /api/reddit/posts
- Fetch posts from r/PhotoshopRequest
POST /api/gemini/parse
- Parse request text into edit formPOST /api/gemini/edit
- Process image with edit form
Built with shadcn/ui components:
Card
- Post/request containersButton
- Actions and interactionsTabs
- Navigation between viewsTable
- History and data displaySlider
- Before/after image comparisonBadge
- Status indicators
- Connect your GitHub repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy automatically on push
The app can be deployed to any platform supporting Next.js:
- Netlify
- Railway
- DigitalOcean App Platform
- Persistent Storage: S3/Supabase for image storage
- Database Integration: Store processing history and user preferences
- Batch Processing: Process multiple requests simultaneously
- Advanced Editing: More sophisticated edit types and styles
- User Authentication: Multi-user support with access controls
- Webhooks: Real-time Reddit post notifications
- Analytics: Processing metrics and performance insights
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
- TypeScript: Full type safety
- ESLint: Code linting and formatting
- Prettier: Code formatting (via ESLint)
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT License - see LICENSE file for details.
For issues and questions:
- Check the Issues page
- Create a new issue with detailed information
- Include error messages and steps to reproduce
- Google Gemini AI for powerful AI models
- Reddit for the PhotoshopRequest community
- shadcn/ui for beautiful UI components
- Next.js for the React framework
Built with โค๏ธ for the creative community