A modern e-commerce platform for selling digital media assets including images, videos, e-books, and PDFs. Built with Next.js, TypeScript, and integrated with ImageKit for media storage and Razorpay for payments.
PixelKit is a comprehensive digital media marketplace similar to Shutterstock and ImagesBazaar, where creators can sell their digital assets in various formats and sizes. The platform handles dynamic image resizing, multiple licensing options, and secure payment processing.
- Multi-format Digital Assets: Support for images, videos, e-books, and PDFs
- Dynamic Image Variants: Automatic generation of different sizes and aspect ratios
- Flexible Licensing: Personal and commercial license options
- Secure Payments: Integrated Razorpay payment gateway
- Cloud Storage: ImageKit integration for efficient media management
- User Authentication: NextAuth.js for secure user management
- Admin Panel: Complete product and order management system
- Frontend: Next.js 15, React 19, TypeScript
- Styling: Tailwind CSS
- Backend: Next.js API Routes
- Database: MongoDB with Mongoose ODM
- Authentication: NextAuth.js
- Media Storage: ImageKit
- Payments: Razorpay
- Email: Nodemailer
The platform supports three main image formats:
- Square (1:1): 1200x1200px - Perfect for social media
- Widescreen (16:9): 1920x1080px - Ideal for presentations and videos
- Portrait (3:4): 1080x1440px - Great for mobile content
Each variant can have different pricing and licensing options.
- Personal License: For individual use, personal projects
- Commercial License: For business use, commercial projects
- Node.js 18+
- MongoDB database
- ImageKit account
- Razorpay account
-
Clone the repository
git clone <repository-url> cd pixelKit
-
Install dependencies
npm install
-
Environment Setup Create a
.env.localfile with the following variables:# Database MONGODB_URI=your_mongodb_connection_string # NextAuth NEXTAUTH_SECRET=your_nextauth_secret NEXTAUTH_URL=http://localhost:3000 # ImageKit IMAGEKIT_PUBLIC_KEY=your_imagekit_public_key IMAGEKIT_PRIVATE_KEY=your_imagekit_private_key IMAGEKIT_URL_ENDPOINT=your_imagekit_url_endpoint # Razorpay RAZORPAY_KEY_ID=your_razorpay_key_id RAZORPAY_KEY_SECRET=your_razorpay_key_secret # Email (Optional) EMAIL_SERVER_HOST=your_smtp_host EMAIL_SERVER_PORT=587 EMAIL_SERVER_USER=your_email_user EMAIL_SERVER_PASSWORD=your_email_password
-
Run the development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
pixelKit/
βββ app/ # Next.js App Router
β βββ admin/ # Admin dashboard
β βββ api/ # API routes
β β βββ auth/ # Authentication endpoints
β β βββ products/ # Product management
β β βββ orders/ # Order processing
β β βββ webhook/ # Payment webhooks
β βββ components/ # Reusable React components
β βββ login/ # User login page
β βββ register/ # User registration
β βββ products/ # Product catalog
β βββ orders/ # Order history
βββ lib/ # Utility libraries
βββ models/ # MongoDB schemas
βββ types.d.ts # TypeScript definitions
- Images are stored in their original format
- On-demand resizing for different variants
- Automatic aspect ratio maintenance
- Quality optimization for web delivery
- Secure Razorpay integration
- Webhook handling for payment verification
- Order status tracking
- Download link generation after successful payment
- Secure authentication with NextAuth.js
- User registration and login
- Order history tracking
- Admin role management
- Product upload and management
- Order monitoring and fulfillment
- User management
- Sales analytics
POST /api/auth/register- User registrationPOST /api/auth/login- User loginGET /api/auth/session- Get current session
GET /api/products- List all productsGET /api/products/[id]- Get specific productPOST /api/products- Create new product (Admin)PUT /api/products/[id]- Update product (Admin)DELETE /api/products/[id]- Delete product (Admin)
GET /api/orders- Get user ordersPOST /api/orders- Create new orderGET /api/orders/user- Get user-specific orders
POST /api/webhook/razorpay- Razorpay webhook handler
- Responsive Design: Mobile-first approach
- Modern Interface: Clean, professional design
- Image Gallery: High-quality product previews
- Shopping Cart: Seamless checkout experience
- Order Tracking: Real-time order status updates
- Authentication: Secure user sessions
- Payment Security: PCI-compliant payment processing
- File Upload: Secure media upload with validation
- API Protection: Rate limiting and input validation
- Data Encryption: Sensitive data encryption
-
Connect to Vercel
npm install -g vercel vercel login
-
Deploy
vercel --prod
-
Environment Variables Set all environment variables in Vercel dashboard
The application can be deployed on any platform that supports Next.js:
- Netlify
- Railway
- DigitalOcean App Platform
- AWS Amplify
- Advanced Search: AI-powered image search
- Bulk Downloads: Multiple asset purchases
- Subscription Plans: Monthly/yearly subscriptions
- Creator Dashboard: Analytics for content creators
- API Access: Public API for third-party integrations
- Mobile App: React Native mobile application
- Advanced Licensing: Extended license options
- Analytics: Detailed sales and user analytics
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue in the repository
- Contact the development team
- Check the documentation
- Next.js team for the amazing framework
- ImageKit for media storage solutions
- Razorpay for payment processing
- MongoDB for database solutions
- The open-source community for various libraries and tools
PixelKit - Empowering creators to monetize their digital assets with ease and security.