A modern AI image generation and processing web application.
🚀 Live Demo: Editify AI

## 📌 Overview
Editify AI is a MERN (MongoDB, Express.js, React, Node.js) application that lets users generate images from text prompts and transform existing images using multiple AI-powered tools. The UI is clean, fast, and mobile‑first, optimized with Tailwind CSS and motion animations.
- Frontend: React (Vite), Tailwind CSS, Framer/Motion
- Backend: Node.js, Express.js
- Database: MongoDB (Mongoose)
- Payments: Razorpay
- AI Provider: Clipdrop APIs
- Auth: JWT
- Deployment: Vercel (client), Render/Node hosting (server)
- ✅ Text‑to‑Image generation (Clipdrop Text-to-Image)
- ✅ Image Cleanup (remove unwanted objects)
- ✅ Background Removal (transparent PNG)
- ✅ Text Removal (remove watermarks/captions)
- ✅ UnCrop (extend image beyond borders)
- ✅ Product Photography Enhancement (lighting/shadows)
- ✅ Interactive image comparison sliders (before/after)
- ✅ Modern monochromatic UI, responsive layouts
- ✅ Smooth motion animations and micro‑interactions
- ✅ “Generate” and “Process” tabs in results workflow
- ✅ JWT-based authentication (login/register)
- ✅ Credits system (balance tracked per user)
- ✅ Razorpay payments (Basic/Advanced/Business plans)
- ✅ Robust error handling, toasts, and loading states
- ✅ CORS configured + increased payload limit for image uploads
- Email/password with bcrypt hashing
- JWT tokens stored client-side; sent via
headers.token userAuthmiddleware decodes token and attachesuserIdto the request body
- Create order:
/api/user/pay-razor(auth required) - Verify order:
/api/user/verify-razorpay - Adds credits to the user upon successful verification
Make sure you have valid Razorpay Test or Live credentials in your server
.env.
The server integrates with Clipdrop:
text-to-image/v1cleanup/v1(object removal)remove-background/v1remove-text/v1uncrop/v1
All image endpoints accept base64 images (client compresses large images before upload).
Create a .env in server/ with:
PORT=4000
MONGODB_URI=mongodb://localhost:27017/ai-image-generator
JWT_SECRET=your_jwt_secret
# Razorpay
RAZORPAY_KEY_ID=rzp_test_xxxxxxxxxxx
RAZORPAY_KEY_SECRET=xxxxxxxxxxxxxxxxx
# Clipdrop
CLIPDROP_API=clipdrop_xxxxxxxxxxxxxxxxx
Create a .env in client/ (Vite):
VITE_BACKEND_URL=http://localhost:4000
VITE_RAZORPAY_KEY_ID=rzp_test_xxxxxxxxxxx
cd server
npm install
npm run server # starts nodemon (see package.json)
cd client
npm install
npm run dev
POST /api/user/registerPOST /api/user/loginGET /api/user/credits(auth)
POST /api/user/pay-razor(auth)POST /api/user/verify-razorpay
POST /api/image/generate-image(auth)
POST /api/image-processing/cleanup(auth)POST /api/image-processing/remove-background(auth)POST /api/image-processing/remove-text(auth)POST /api/image-processing/uncrop(auth)POST /api/image-processing/product-photography(auth)
- Header: “Complete AI Image Suite” with feature highlights
- Home: Feature grid, workflow, testimonials, pricing
- Sliders for Cleanup and Background Removal
- Result page with tabs (Generate vs Process) and improved prompts
- If you see CORS errors, ensure server CORS is configured for the client origin and JSON limits are high enough (
50mb). - Razorpay 401 “Authentication failed” → verify server
.envkeys; restart server. - Large images → client compresses >2MB before sending; server validates up to 10MB.
MIT