GenPixel is a modern web application that allows users to upload images and apply a variety of AI-powered transformations like background removal, recoloring, object removal, and more. It uses Next.js 13, Cloudinary, MongoDB, and Tailwind CSS to deliver a seamless, full-stack image editing experience.
- 🔄 Apply powerful image transformations:
- Restore
- Recolor
- Remove Background
- Remove Objects
- Fill with Custom Aspect Ratios
- ☁️ Upload and manage images via Cloudinary
- 👤 User authentication and credit-based system
- 💾 Save and update transformed images to a database
- 📐 Responsive and interactive design with live image previews
- Next.js 13 (App Router)
- Tailwind CSS
- MongoDB + Mongoose
- Cloudinary
- React Hook Form + Zod
- ShadCN UI Components
Ensure the following are installed:
- Node.js (v18+)
- MongoDB (local or Atlas)
- A Cloudinary account
Create a .env.local file and add the following:
MONGODB_URI=your_mongodb_connection_string
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secretgit clone https://github.com/yourusername/genpixel.git
cd genpixel
npm installnpm run devOpen your browser and go to http://localhost:3000.
- Upload an image using the MediaUploader.
- Choose a transformation type (e.g., recolor, remove background).
- Input additional info (e.g., prompt or target color).
- Click Apply Transformation – a transformation config is generated and applied via a Cloudinary URL.
- Save the final transformed image – it's stored with metadata in MongoDB.
components/
└── shared/
└── transformation/
lib/
└── actions/
└── utils.ts
pages/
└── transformations/
public/
styles/Each transformation reduces a user's credit balance. The app checks if the user has enough credits before allowing transformations.
- User uploads → Transformation config is created → Cloudinary applies it → Credits updated → Transformed image saved