Generate an image editing application using which a user generates a product photoshoot image using the products image and a prompt about how the photoshoot should appear like with credits based subscription model and google login
9bac6d3 verified | <html lang="en" class="h-full"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>PixelPerfect AI Studio | AI Product Photoshoots</title> | |
| <link rel="icon" type="image/x-icon" href="/static/favicon.ico"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <script> | |
| tailwind.config = { | |
| theme: { | |
| extend: { | |
| colors: { | |
| primary: '#6366f1', | |
| secondary: '#8b5cf6', | |
| dark: '#1e293b', | |
| light: '#f8fafc' | |
| } | |
| } | |
| } | |
| } | |
| </script> | |
| <style> | |
| .dropzone { | |
| border: 2px dashed #cbd5e1; | |
| transition: all 0.3s ease; | |
| } | |
| .dropzone-active { | |
| border-color: #6366f1; | |
| background-color: #eef2ff; | |
| } | |
| .gradient-text { | |
| background-clip: text; | |
| -webkit-background-clip: text; | |
| color: transparent; | |
| background-image: linear-gradient(45deg, #6366f1, #8b5cf6); | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-light min-h-full font-sans antialiased"> | |
| <nav class="bg-white shadow-sm"> | |
| <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> | |
| <div class="flex justify-between h-16"> | |
| <div class="flex items-center"> | |
| <a href="#" class="flex-shrink-0 flex items-center"> | |
| <span class="text-xl font-bold gradient-text">PixelPerfect AI</span> | |
| </a> | |
| </div> | |
| <div class="flex items-center space-x-4"> | |
| <a href="#" class="text-gray-600 hover:text-primary px-3 py-2 rounded-md text-sm font-medium">Pricing</a> | |
| <a href="#" class="text-gray-600 hover:text-primary px-3 py-2 rounded-md text-sm font-medium">Gallery</a> | |
| <button id="authButton" class="bg-primary text-white px-4 py-2 rounded-md text-sm font-medium hover:bg-indigo-600 transition">Sign In</button> | |
| </div> | |
| </div> | |
| </div> | |
| </nav> | |
| <main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12"> | |
| <section class="text-center mb-16"> | |
| <h1 class="text-4xl md:text-5xl font-bold text-gray-900 mb-4">Transform Your Product Images <span class="gradient-text">With AI Magic</span></h1> | |
| <p class="text-lg text-gray-600 max-w-2xl mx-auto">Upload any product photo and describe your dream photoshoot. Our AI will generate stunning, professional-grade images instantly.</p> | |
| </section> | |
| <div class="grid grid-cols-1 lg:grid-cols-2 gap-8"> | |
| <div class="bg-white rounded-xl shadow-md overflow-hidden p-6"> | |
| <div id="dropzone" class="dropzone rounded-lg p-8 text-center cursor-pointer mb-6"> | |
| <i data-feather="upload" class="w-12 h-12 text-primary mx-auto mb-4"></i> | |
| <h3 class="text-lg font-medium text-gray-900 mb-2">Upload Product Image</h3> | |
| <p class="text-gray-500 mb-4">Drag & drop or click to browse</p> | |
| <input type="file" id="fileInput" class="hidden" accept="image/*"> | |
| <button class="bg-primary text-white px-4 py-2 rounded-md text-sm font-medium">Select File</button> | |
| </div> | |
| <div class="mb-6"> | |
| <label for="prompt" class="block text-sm font-medium text-gray-700 mb-2">Describe your photoshoot style</label> | |
| <textarea id="prompt" rows="4" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary focus:border-primary" placeholder="e.g. 'Luxury gold watch on marble table with soft lighting and green plants in background'"></textarea> | |
| </div> | |
| <div class="flex items-center justify-between"> | |
| <div> | |
| <p class="text-sm text-gray-500">Credits: <span class="font-medium text-gray-900">5</span></p> | |
| </div> | |
| <button class="bg-primary text-white px-6 py-3 rounded-md font-medium hover:bg-indigo-600 transition flex items-center"> | |
| <i data-feather="zap" class="w-4 h-4 mr-2"></i> | |
| Generate (1 credit) | |
| </button> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-xl shadow-md overflow-hidden p-6"> | |
| <div class="h-64 bg-gray-100 rounded-lg flex items-center justify-center mb-4"> | |
| <div class="text-center"> | |
| <i data-feather="image" class="w-12 h-12 text-gray-400 mx-auto mb-4"></i> | |
| <p class="text-gray-500">Your generated image will appear here</p> | |
| </div> | |
| </div> | |
| <div class="flex space-x-4"> | |
| <div class="flex-1"> | |
| <button class="w-full bg-gray-200 text-gray-800 px-4 py-2 rounded-md font-medium hover:bg-gray-300 transition flex items-center justify-center" disabled> | |
| <i data-feather="download" class="w-4 h-4 mr-2"></i> | |
| Download HD | |
| </button> | |
| </div> | |
| <div class="flex-1"> | |
| <button class="w-full bg-gray-200 text-gray-800 px-4 py-2 rounded-md font-medium hover:bg-gray-300 transition flex items-center justify-center" disabled> | |
| <i data-feather="repeat" class="w-4 h-4 mr-2"></i> | |
| Regenerate | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <section class="mt-20"> | |
| <h2 class="text-2xl font-bold text-gray-900 mb-8 text-center">How It Works</h2> | |
| <div class="grid grid-cols-1 md:grid-cols-3 gap-8"> | |
| <div class="bg-white rounded-xl shadow-md p-6 text-center"> | |
| <div class="w-16 h-16 bg-indigo-100 rounded-full flex items-center justify-center mx-auto mb-4"> | |
| <i data-feather="upload" class="text-primary w-6 h-6"></i> | |
| </div> | |
| <h3 class="text-lg font-medium text-gray-900 mb-2">1. Upload Product</h3> | |
| <p class="text-gray-600">Upload any clear image of your product with a simple background.</p> | |
| </div> | |
| <div class="bg-white rounded-xl shadow-md p-6 text-center"> | |
| <div class="w-16 h-16 bg-indigo-100 rounded-full flex items-center justify-center mx-auto mb-4"> | |
| <i data-feather="edit" class="text-primary w-6 h-6"></i> | |
| </div> | |
| <h3 class="text-lg font-medium text-gray-900 mb-2">2. Describe Style</h3> | |
| <p class="text-gray-600">Tell us your desired background, lighting, and mood.</p> | |
| </div> | |
| <div class="bg-white rounded-xl shadow-md p-6 text-center"> | |
| <div class="w-16 h-16 bg-indigo-100 rounded-full flex items-center justify-center mx-auto mb-4"> | |
| <i data-feather="image" class="text-primary w-6 h-6"></i> | |
| </div> | |
| <h3 class="text-lg font-medium text-gray-900 mb-2">3. Get Perfect Image</h3> | |
| <p class="text-gray-600">Download your professional product photo instantly.</p> | |
| </div> | |
| </div> | |
| </section> | |
| <section class="mt-20 bg-gradient-to-r from-primary to-secondary rounded-xl p-8 text-white"> | |
| <div class="max-w-3xl mx-auto text-center"> | |
| <h2 class="text-2xl font-bold mb-4">Ready to Transform Your Product Images?</h2> | |
| <p class="mb-6 opacity-90">Join thousands of businesses creating stunning product photos effortlessly.</p> | |
| <button class="bg-white text-primary px-6 py-3 rounded-md font-medium hover:bg-opacity-90 transition"> | |
| Get Started - 5 Free Credits | |
| </button> | |
| </div> | |
| </section> | |
| </main> | |
| <footer class="bg-white border-t border-gray-200 mt-20"> | |
| <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12"> | |
| <div class="grid grid-cols-2 md:grid-cols-4 gap-8"> | |
| <div> | |
| <h3 class="text-sm font-semibold text-gray-900 tracking-wider uppercase mb-4">Product</h3> | |
| <ul class="space-y-2"> | |
| <li><a href="#" class="text-gray-600 hover:text-primary">Features</a></li> | |
| <li><a href="#" class="text-gray-600 hover:text-primary">Pricing</a></li> | |
| <li><a href="#" class="text-gray-600 hover:text-primary">Gallery</a></li> | |
| </ul> | |
| </div> | |
| <div> | |
| <h3 class="text-sm font-semibold text-gray-900 tracking-wider uppercase mb-4">Resources</h3> | |
| <ul class="space-y-2"> | |
| <li><a href="#" class="text-gray-600 hover:text-primary">Blog</a></li> | |
| <li><a href="#" class="text-gray-600 hover:text-primary">Tutorials</a></li> | |
| <li><a href="#" class="text-gray-600 hover:text-primary">Support</a></li> | |
| </ul> | |
| </div> | |
| <div> | |
| <h3 class="text-sm font-semibold text-gray-900 tracking-wider uppercase mb-4">Company</h3> | |
| <ul class="space-y-2"> | |
| <li><a href="#" class="text-gray-600 hover:text-primary">About</a></li> | |
| <li><a href="#" class="text-gray-600 hover:text-primary">Careers</a></li> | |
| <li><a href="#" class="text-gray-600 hover:text-primary">Contact</a></li> | |
| </ul> | |
| </div> | |
| <div> | |
| <h3 class="text-sm font-semibold text-gray-900 tracking-wider uppercase mb-4">Legal</h3> | |
| <ul class="space-y-2"> | |
| <li><a href="#" class="text-gray-600 hover:text-primary">Privacy</a></li> | |
| <li><a href="#" class="text-gray-600 hover:text-primary">Terms</a></li> | |
| <li><a href="#" class="text-gray-600 hover:text-primary">Cookie Policy</a></li> | |
| </ul> | |
| </div> | |
| </div> | |
| <div class="mt-12 pt-8 border-t border-gray-200 flex flex-col md:flex-row justify-between items-center"> | |
| <p class="text-gray-500 text-sm">© 2023 PixelPerfect AI. All rights reserved.</p> | |
| <div class="flex space-x-6 mt-4 md:mt-0"> | |
| <a href="#" class="text-gray-400 hover:text-primary"> | |
| <i data-feather="twitter" class="w-5 h-5"></i> | |
| </a> | |
| <a href="#" class="text-gray-400 hover:text-primary"> | |
| <i data-feather="instagram" class="w-5 h-5"></i> | |
| </a> | |
| <a href="#" class="text-gray-400 hover:text-primary"> | |
| <i data-feather="facebook" class="w-5 h-5"></i> | |
| </a> | |
| </div> | |
| </div> | |
| </div> | |
| </footer> | |
| <script> | |
| // Initialize Feather Icons | |
| feather.replace(); | |
| // Dropzone functionality | |
| const dropzone = document.getElementById('dropzone'); | |
| const fileInput = document.getElementById('fileInput'); | |
| dropzone.addEventListener('click', () => { | |
| fileInput.click(); | |
| }); | |
| ['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => { | |
| dropzone.addEventListener(eventName, preventDefaults, false); | |
| }); | |
| function preventDefaults(e) { | |
| e.preventDefault(); | |
| e.stopPropagation(); | |
| } | |
| ['dragenter', 'dragover'].forEach(eventName => { | |
| dropzone.addEventListener(eventName, highlight, false); | |
| }); | |
| ['dragleave', 'drop'].forEach(eventName => { | |
| dropzone.addEventListener(eventName, unhighlight, false); | |
| }); | |
| function highlight() { | |
| dropzone.classList.add('dropzone-active'); | |
| } | |
| function unhighlight() { | |
| dropzone.classList.remove('dropzone-active'); | |
| } | |
| dropzone.addEventListener('drop', handleDrop, false); | |
| function handleDrop(e) { | |
| const dt = e.dataTransfer; | |
| const files = dt.files; | |
| handleFiles(files); | |
| } | |
| fileInput.addEventListener('change', function() { | |
| handleFiles(this.files); | |
| }); | |
| function handleFiles(files) { | |
| if (files.length) { | |
| const file = files[0]; | |
| if (file.type.startsWith('image/')) { | |
| const reader = new FileReader(); | |
| reader.onload = function(e) { | |
| dropzone.innerHTML = `<img src="${e.target.result}" class="max-h-64 mx-auto" alt="Uploaded product" />`; | |
| }; | |
| reader.readAsDataURL(file); | |
| } | |
| } | |
| } | |
| // Google Auth simulation | |
| document.getElementById('authButton').addEventListener('click', function() { | |
| this.textContent = 'My Account'; | |
| this.classList.remove('bg-primary'); | |
| this.classList.add('bg-secondary'); | |
| }); | |
| </script> | |
| </body> | |
| </html> | |