Transform your photos with AI-powered editing tools
Remove backgrounds, enhance quality, and create stunning visuals in seconds.
Pixelate AI provides a comprehensive suite of AI-powered image editing tools:
- π AI Background Removal - Remove backgrounds with precision AI technology in one click
- πΌοΈ AI Generative Fill - Expand canvas and auto-fill edges seamlessly for perfect aspect ratios
- β‘ AI Upscale & Enhance - Boost resolution up to 4x while preserving and enhancing details
- βοΈ Smart Crop & Face Focus - Automatic intelligent cropping with face detection
- π Watermark & Text Overlay - Add custom watermarks and text with professional positioning
- Real-time image editing canvas
- Before/After comparison slider
- Drag-and-drop file upload
- Job queue system for processing
- Progress tracking for transformations
- Download processed images
- User Authentication - Secure login with NextAuth
- Subscription Management - Stripe integration for payments
- Usage Limits - Free tier (3 uploads) and unlimited Pro plan
- User Roles - Support for User, Admin, and Moderator roles
- Real-time Notifications - Payment status and processing updates
- Next.js 16 - React framework with App Router
- React 19 - Latest React with concurrent features
- TypeScript - Type-safe development
- Tailwind CSS 4 - Utility-first styling
- Framer Motion - Smooth animations
- shadcn/ui - Beautiful, accessible components
- Radix UI - Unstyled, accessible primitives
- Prisma - Type-safe ORM
- MongoDB - NoSQL database
- NextAuth.js - Authentication solution
- Stripe - Payment processing
- ImageKit - Image CDN and transformation
- Zod - Schema validation
- React Hook Form - Form management
Before you begin, ensure you have the following installed:
- Node.js 20.x or higher
- npm or yarn or pnpm or bun
- MongoDB database (local or Atlas)
- Stripe account
- ImageKit account
- NextAuth OAuth providers (Google, GitHub, etc.)
git clone <your-repo-url>
cd saassnpm install
# or
yarn install
# or
pnpm install
# or
bun installCreate a .env file in the root directory with the following variables:
# Database
DATABASE_URL="mongodb url link"
# NextAuth
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="your-secret-key-here"
# OAuth Providers (configure as needed)
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
# Stripe
STRIPE_SECRET_KEY="sk_test_..."
STRIPE_PUBLISHABLE_KEY="pk_test_..."
STRIPE_WEBHOOK_SECRET="whsec_..."
NEXT_PUBLIC_STRIPE_PRO_PRICE_ID="price_..."
# ImageKit
NEXT_PUBLIC_IMAGEKIT_PUBLIC_KEY="your-public-key"
IMAGEKIT_PRIVATE_KEY="your-private-key"
IMAGEKIT_URL_ENDPOINT="https://ik.imagekit.io/your-id"Generate Prisma Client and push the schema to your database:
npx prisma generate
npx prisma db pushTo view your database in Prisma Studio:
npx prisma studionpm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 in your browser to see the application.
saass/
βββ prisma/
β βββ schema.prisma # Database schema
βββ public/ # Static assets
βββ src/
β βββ app/ # Next.js App Router
β β βββ api/ # API routes
β β β βββ auth/ # NextAuth handlers
β β β βββ create-checkout-session/
β β β βββ upload-auth/ # ImageKit auth
β β β βββ usage/ # Usage tracking
β β β βββ webhooks/ # Stripe webhooks
β β βββ layout.tsx # Root layout
β β βββ page.tsx # Home page
β β βββ Providers.tsx # Context providers
β βββ components/
β β βββ footer/ # Footer component
β β βββ modals/ # Modal components
β β βββ navbar/ # Navigation
β β βββ ui/ # shadcn/ui components
β βββ hooks/ # Custom React hooks
β βββ lib/ # Utilities & configs
β β βββ auth.ts # NextAuth configuration
β β βββ prisma.ts # Prisma client
β β βββ utils.ts # Helper functions
β βββ modules/
β βββ editor/ # Main editor module
β βββ feature/ # Features showcase
β βββ hero/ # Hero section
β βββ pricings/ # Pricing plans
βββ components.json # shadcn/ui config
βββ next.config.ts # Next.js config
βββ package.json # Dependencies
βββ postcss.config.mjs # PostCSS config
βββ tailwind.config.ts # Tailwind config
βββ tsconfig.json # TypeScript config
- Create a Stripe account at stripe.com
- Get your API keys from the Stripe Dashboard
- Create a product and price for the Pro plan
- Set up a webhook endpoint pointing to
/api/webhooks/stripe - Add the webhook secret to your
.envfile
- Create an ImageKit account at imagekit.io
- Get your public/private keys and URL endpoint
- Configure the transformation endpoints as needed
- Add credentials to your
.envfile
- Generate a secret:
openssl rand -base64 32 - Configure OAuth providers in
src/lib/auth.ts - Set up OAuth apps with your providers (Google, GitHub, etc.)
- Add client IDs and secrets to
.env
- Sign Up/Login - Authenticate using OAuth providers
- Upload Image - Drag and drop or click to upload
- Choose Tool - Select from AI editing tools
- Process - Watch as AI transforms your image
- Download - Save your edited image
Free Plan:
- 3 image uploads
- Access to all features
- Standard processing speed
Pro Plan ($9.99/month):
- Unlimited uploads
- Priority processing
- Advanced AI models
- Premium support
| Endpoint | Method | Description |
|---|---|---|
/api/auth/[...nextauth] |
* | NextAuth authentication |
/api/create-checkout-session |
POST | Create Stripe checkout |
/api/upload-auth |
GET | ImageKit upload token |
/api/usage |
GET/POST | Track usage limits |
/api/webhooks/stripe |
POST | Stripe webhook handler |
- Modify
src/app/globals.cssfor global styles - Update Tailwind config in
tailwind.config.ts - Theme customization in CSS variables
- Create new components in
src/components/ - Add API routes in
src/app/api/ - Update database schema in
prisma/schema.prisma - Run
npx prisma db pushto apply changes
npm run build
npm run start- Push your code to GitHub
- Import the repository in Vercel
- Add environment variables
- Deploy!
The app can be deployed on any platform that supports Next.js:
- Netlify
- Railway
- AWS
- DigitalOcean
- Render
- Environment variables are never exposed to the client
- Stripe webhooks are verified using signatures
- NextAuth handles secure session management
- CORS is properly configured for API routes
- Input validation using Zod schemas
Database Connection Error:
# Verify your DATABASE_URL is correct
# Check MongoDB Atlas network access settings
npx prisma db pushStripe Webhook Failing:
# Use Stripe CLI for local testing
stripe listen --forward-to localhost:3000/api/webhooks/stripeImage Upload Issues:
# Verify ImageKit credentials
# Check CORS settings in ImageKit dashboardContributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- 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
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js for the amazing framework
- shadcn/ui for beautiful components
- Stripe for payment processing
- ImageKit for image transformations
- Vercel for hosting
For support, email [email protected] or join our Slack channel.
Made with β€οΈ by the Pixelate AI Team
Features β’ Getting Started β’ API β’ Support