from flask import Flask, request, jsonify import requests import threading import time from datetime import datetime import os # ⭐ AI KEYS GROQ_KEY = "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" OPENROUTER_KEY = "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" os.environ["GROQ_API_KEY"] = GROQ_KEY app = Flask(__name__) VERCEL = "https://ai-ivory-delta.vercel.app" stats = {"sites": 0, "deployed": 0, "started": datetime.now().isoformat()} logs = [] running = False def add_log(msg): logs.append(f"[{datetime.now().strftime('%H:%M:%S')}] {msg}") if len(logs) > 50: logs.pop(0) def call_best_ai(prompt): """Try ALL free models via OpenRouter""" models = [ ("google/gemini-2.0-flash-001", "Gemini"), ("anthropic/claude-3-haiku", "Claude"), ("deepseek/deepseek-r1", "DeepSeek"), ("meta-llama/llama-3.3-70b-instruct", "Llama"), ("mistralai/mistral-7b-instruct", "Mistral"), ] for model_id, name in models: try: r = requests.post("https://openrouter.ai/api/v1/chat/completions", headers={"Authorization": f"Bearer {OPENROUTER_KEY}", "Content-Type": "application/json"}, json={"model": model_id, "max_tokens": 8000, "temperature": 0.3, "messages": [{"role": "system", "content": "You are an elite web developer. Return complete HTML with premium dark theme design."}, {"role": "user", "content": prompt}]}, timeout=300) if r.ok: html = r.json()["choices"][0]["message"]["content"] if html and len(html) > 500: add_log(f"✅ {name}") if "```html" in html: html = html.split("```html")[-1].split("```")[0] return html except: pass return "" def get_design_rules(): return """DESIGN RULES: - Dark background #0A0A0F — NEVER white - Orange #FF6B00 accent on headings, buttons, icons - Bebas Neue (headings) + DM Sans (body) + Space Mono (labels) from Google Fonts CDN - Cards: #111118, 14px radius, #2A2A38 border, orange top accent line - Hero: gradient background with radial glow - Stats: Bebas Neue 48px orange numbers - Buttons: Space Mono bold, orange primary - Font Awesome 6 CDN icons - Real Hindi+English content, Indian names, NO Lorem Ipsum - Mobile responsive""" # ========== ALL WEBSITE BUILDERS ========== @app.route("/api/build-premium", methods=["POST"]) def build_premium(): data = request.json niche = data.get("niche", "AI Tools") site_type = data.get("type", "website") add_log(f"✨ Premium: {niche}") extras = { "movie": """MOVIE WEBSITE - CRITICAL INSTRUCTIONS: YOU MUST INCLUDE 50 MOVIES MINIMUM in a responsive grid. FOR EVERY SINGLE MOVIE CARD, you MUST include this EXACT YouTube embed code: USE THESE EXACT 50 MOVIES with YouTube IDs: Deadpool 3(ztLkQZx1HMs⭐8.5), Dune 2(Way9Dexny3w⭐9.0), Godzilla x Kong(lV1OOlGw3FM⭐7.8), Kung Fu Panda 4(_inKs4eeHiI⭐7.2), Furiosa(XJMuhwV6cA4⭐8.0), Inside Out 2(LAfT8Mn3pc⭐8.3), Avatar 3, Avengers Secret Wars, Spider-Man 4, Superman Legacy, Fantastic Four, Blade, Thunderbolts, Captain America 4, Joker 2, Venom 3, Bad Boys 4, Despicable Me 4, Sonic 3, Mufasa, Kraven, Madame Web, Aquaman 2, Transformers 8, Fast Furious 11, Mission Impossible 8, John Wick 5, Extraction 3, The Equalizer 4, Alien Romulus, A Quiet Place 3, Scream 7, Saw 11, The Conjuring 4, Ghostbusters 5, Beetlejuice 2, Twisters, Gladiator 2, Wicked, Wonka 2, Minecraft Movie, Borderlands, Mortal Kombat 2, Street Fighter, Resident Evil, Silent Hill, Five Nights at Freddys 2, The Crow, Snow White, Moana 2, Mufasa The Lion King. EVERY CARD MUST HAVE: 1. The YouTube embed iframe above 2. Movie name in Hindi + English 3. ⭐ IMDB rating 4. Genre tags 5. "Watch Full Movie" button linking to: https://www.youtube.com/results?search_query=MOVIE_NAME+hindi+dubbed+full+movie 6. Hindi description (2 lines) Include: Working search bar, Category filters (All, Action, Sci-Fi, Horror, Comedy, Animation). CRITICAL: The YouTube iframe MUST be present in EVERY movie card. This is non-negotiable.""", "game": """GAMING WEBSITE with 20 games: Games: Free Fire Max, BGMI, GTA 6, Minecraft, PUBG Mobile, Call of Duty Mobile, Clash of Clans, Subway Surfers, Temple Run, Candy Crush, Asphalt 9, FIFA Mobile, GTA 5, Valorant, Fortnite, Among Us, Roblox, Apex Legends, Clash Royale, eFootball. Each card: Game name+emoji, category, download size, ⭐ rating, Hindi description, "Download Guide" button, "Tips & Tricks" button. Include: Category filters, "How to Download" steps, Latest News section.""", "tool": """TOOLS WEBSITE with REAL working JavaScript tools: Build 3-4 WORKING tools: Calculator, Converter, Generator, or Resizer. Each tool must have REAL JavaScript that actually works when user interacts. Include: Tool name, description, working input/output.""", "smm": """SMM PANEL with real services: Services: Instagram Followers(₹199), Instagram Likes(₹49), YouTube Views(₹149), YouTube Subscribers(₹299), Facebook Likes(₹79), Twitter Followers(₹149), Telegram Members(₹99), WhatsApp Channel(₹129). Each: Platform icon, service name, price, min-max, "Order Now" button. Include: How It Works, Payment methods, Live order counter, FAQ.""", "news": """NEWS WEBSITE auto-updating: Include: Latest news section, category filters (India, World, Tech, Sports, Entertainment), trending topics, search bar. Design news cards with title, image placeholder, category tag, time, summary.""", "education": """EDUCATION WEBSITE for Indian students: Subjects: UPSC, SSC, Banking, Railway, NEET, JEE. Each: Study material, PDF links, YouTube video embeds, quiz section. Include: Subject filters, search, "Download Notes" buttons.""", "finance": """FINANCE TOOLS WEBSITE: Tools: Income Tax Calculator(working JS), EMI Calculator(working JS), SIP Calculator, GST Calculator, Salary Calculator. Each: Input fields, calculate button, result display with charts. Include: Financial tips blog section.""", "sports": """SPORTS WEBSITE for Indian audience: Cricket: Live score section, IPL 2025, Team India schedule. Football: FIFA World Cup, ISL. Include: Score cards, match schedule, news updates.""", "music": """MUSIC WEBSITE: Bollywood songs, Devotional, Punjabi, Latest hits. Each: Song name, artist, YouTube embed player, download link. Include: Genre filters, search, Top 20 chart.""", "apps": """APPS/MODS WEBSITE: Apps: GB WhatsApp, Instagram Pro, YouTube Vanced, Spotify Mod, Netflix Mod, CapCut Pro, PicsArt Gold, Kinemaster Mod, Free Fire Mod, BGMI Mod. Each: App icon, name, version, size, features list, "Download" button. Include: Category filters, "How to Install" guide, FAQ.""" } prompt = f"""Build a PREMIUM {site_type.upper()} WEBSITE for: {niche}. {get_design_rules()} {extras.get(site_type, "Premium website with all sections.")} SECTIONS: Nav, Hero, Stats(4), Items Grid, Testimonials(3 Indian), FAQ(8), Contact, Footer. Return COMPLETE HTML: , CSS in
10 Website Types | Claude + DeepSeek + Gemini | OpenRouter
0
0
3
10