Spaces:
Running
Running
Commit History
-
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>CyberSleuth | Advanced OSINT Research Platform</title> <script src="https://cdn.tailwindcss.com"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <style> :root { --primary: #4f46e5; --secondary: #10b981; --dark: #1e293b; --light: #f8fafc; } body { font-family: 'Inter', sans-serif; background-color: #f1f5f9; } .gradient-bg { background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%); } .tool-card:hover { transform: translateY(-5px); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); } .search-input:focus { box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3); } .result-card { transition: all 0.3s ease; } .result-card:hover { border-left: 4px solid var(--primary); } .tab-active { border-bottom: 3px solid var(--primary); color: var(--primary); } .pulse-animation { animation: pulse 2s infinite; } @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(79, 70, 229, 0); } 100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); } } </style> </head> <body> <!-- Navigation --> <nav class="gradient-bg text-white shadow-lg"> <div class="container mx-auto px-4 py-3 flex justify-between items-center"> <div class="flex items-center space-x-2"> <i class="fas fa-user-secret text-2xl"></i> <span class="text-xl font-bold">CyberSleuth</span> </div> <div class="hidden md:flex space-x-6"> <a href="#dashboard" class="hover:text-gray-200 font-medium">Dashboard</a> <a href="#tools" class="hover:text-gray-200 font-medium">Tools</a> <a href="#reports" class="hover:text-gray-200 font-medium">Reports</a> <a href="#resources" class="hover:text-gray-200 font-medium">Resources</a> <a href="#about" class="hover:text-gray-200 font-medium">About</a> </div> <div class="flex items-center space-x-4"> <button id="showLogin" class="bg-white text-indigo-600 px-4 py-2 rounded-md font-medium hover:bg-gray-100 transition">Login</button> <button id="showRegister" class="hidden md:block bg-indigo-800 text-white px-4 py-2 rounded-md font-medium hover:bg-indigo-900 transition">Sign Up</button> <button class="md:hidden text-white"> <i class="fas fa-bars text-xl"></i> </button> </div> </div> </nav> <!-- Hero Section --> <section class="gradient-bg text-white py-16"> <div class="container mx-auto px-4 text-center"> <h1 class="text-4xl md:text-5xl font-bold mb-6">Advanced OSINT Research Platform</h1> <p class="text-xl md:text-2xl max-w-3xl mx-auto mb-8">Uncover digital footprints with our powerful suite of free OSINT tools designed for cybersecurity professionals and researchers.</p> <div class="max-w-2xl mx-auto bg-white rounded-lg shadow-xl overflow-hidden"> <div class="flex border-b"> <button class="tab-active px-6 py-3 font-medium text-gray-800">Quick Search</button> <button class="px-6 py-3 font-medium text-gray-500 hover:text-gray-800">Advanced</button> <button class="px-6 py-3 font-medium text-gray-500 hover:text-gray-800">Batch</button> </div> <div class="p-6"> <div class="flex"> <input type="text" placeholder="Enter target: username, email, IP, domain..." class="search-input flex-grow px-4 py-3 border border-gray-300 rounded-l-md focus:outline-none focus:ring-2 focus:ring-indigo-500"> <button class="bg-indigo-600 text-white px-6 py-3 rounded-r-md hover:bg-indigo-700 transition flex items-center"> <i class="fas fa-search mr-2"></i> Investigate </button> </div> <div class="mt-4 flex flex-wrap justify-center gap-2"> <span class="text-xs bg-gray-100 text-gray-700 px-2 py-1 rounded">username:john_doe</span> <span class="text-xs bg-gray-100 text-gray-700 px-2 py-1 rounded">email:test@example.com</span> <span class="text-xs bg-gray-100 text-gray-700 px-2 py-1 rounded">domain:example.com</span> <span class="text-xs bg-gray-100 text-gray-700 px-2 py-1 rounded">ip:192.168.1.1</span> <span class="text-xs bg-gray-100 text-gray-700 px-2 py-1 rounded">phone:+123456789</span> </div> </div> </div> </div> </section> <!-- Features Section --> <section class="py-16 bg-white"> <div class="container mx-auto px-4"> <h2 class="text-3xl font-bold text-center mb-12 text-gray-800">Comprehensive OSINT Toolkit</h2> <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"> <!-- Feature Card 1 --> <div class="tool-card bg-white rounded-xl shadow-md overflow-hidden border border-gray-100 transition duration-300"> <div class="p-6"> <div class="flex items-center mb-4"> <div class="bg-indigo-100 p-3 rounded-full mr-4"> <i class="fas fa-globe text-indigo-600 text-xl"></i> </div> <h3 class="text-xl font-semibold text-gray-800">Domain Intelligence</h3> </div> <p class="text-gray-600 mb-4">Gather comprehensive information about domains including WHOIS records, DNS history, subdomains, and associated IP addresses.</p> <div class="flex flex-wrap gap-2"> <span class="text-xs bg-indigo-100 text-indigo-800 px-2 py-1 rounded">WHOIS</span> <span class="text-xs bg-indigo-100 text-indigo-800 px-2 py-1 rounded">DNS</span> <span class="text-xs bg-indigo-100 text-indigo-800 px-2 py-1 rounded">Subdomains</span> <span class="text-xs bg-indigo-100 text-indigo-800 px-2 py-1 rounded">SSL Certs</span> </div> </div> </div> <!-- Feature Card 2 --> <div class="tool-card bg-white rounded-xl shadow-md overflow-hidden border border-gray-100 transition duration-300"> <div class="p-6"> <div class="flex items-center mb-4"> <div class="bg-green-100 p-3 rounded-full mr-4"> <i class="fas fa-user-circle text-green-600 text-xl"></i> </div> <h3 class="text-xl font-semibold text-gray-800">Persona Investigation</h3> </div> <p class="text-gray-600 mb-4">Track digital footprints across social media, forums, and websites to build comprehensive profiles of individuals or organizations.</p> <div class="flex flex-wrap gap-2"> <span class="text-xs bg-green-100 text-green-800 px-2 py-1 rounded">Social Media</span> <span class="text-xs bg-green-100 text-green-800 px-2 py-1 rounded">Username Search</span> <span class="text-xs bg-green-100 text-green-800 px-2 py-1 rounded">Email Search</span> <span class="text-xs bg-green-100 text-green-800 px-2 py-1 rounded">Image Search</span> </div> </div> </div> <!-- Feature Card 3 --> <div class="tool-card bg-white rounded-xl shadow-md overflow-hidden border border-gray-100 transition duration-300"> <div class="p-6"> <div class="flex items-center mb-4"> <div class="bg-purple-100 p-3 rounded-full mr-4"> <i class="fas fa-network-wired text-purple-600 text-xl"></i> </div> <h3 class="text-xl font-semibold text-gray-800">Network Analysis</h3> </div> <p class="text-gray-600 mb-4">Analyze network infrastructure, identify connected devices, and map relationships between different network entities.</p> <div class="flex flex-wrap gap-2"> <span class="text-xs bg-purple-100 text-purple-800 px-2 py-1 rounded">IP Analysis</span> <span class="text-xs bg-purple-100 text-purple-800 px-2 py-1 rounded">Port Scanning</span> <span class="text-xs bg-purple-100 text-purple-800 px-2 py-1 rounded">ASN Lookup</span> <span class="text-xs bg-purple-100 text-purple-800 px-2 py-1 rounded">BGP Routes</span> </div> </div> </div> <!-- Feature Card 4 --> <div class="tool-card bg-white rounded-xl shadow-md overflow-hidden border border-gray-100 transition duration-300"> <div class="p-6"> <div class="flex items-center mb-4"> <div class="bg-red-100 p-3 rounded-full mr-4"> <i class="fas fa-archive text-red-600 text-xl"></i> </div> <h3 class="text-xl font-semibold text-gray-800">Data Breach Search</h3> </div> <p class="text-gray-600 mb-4">Check if email addresses or passwords have been compromised in known data breaches and leaks.</p> <div class="flex flex-wrap gap-2"> <span class="text-xs bg-red-100 text-red-800 px-2 py-1 rounded">Have I Been Pwned</span> <span class="text-xs bg-red-100 text-red-800 px-2 py-1 rounded">Breach Compilation</span> <span class="text-xs bg-red-100 text-red-800 px-2 py-1 rounded">Password Check</span> </div> </div> </div> <!-- Feature Card 5 --> <div class="tool-card bg-white rounded-xl shadow-md overflow-hidden border border-gray-100 transition duration-300"> <div class="p-6"> <div class="flex items-center mb-4"> <div class="bg-yellow-100 p-3 rounded-full mr-4"> <i class="fas fa-code text-yellow-600 text-xl"></i> </div> <h3 class="text-xl font-semibold text-gray-800">Code & Repository Search</h3> </div> <p class="text-gray-600 mb-4">Search across public code repositories for exposed API keys, credentials, or sensitive information.</p> <div class="flex flex-wrap gap-2"> <span class="text-xs bg-yellow-100 text-yellow-800 px-2 py-1 rounded">GitHub</span> <span class="text-xs bg-yellow-100 text-yellow-800 px-2 py-1 rounded">GitLab</span> <span class="text-xs bg-yellow-100 text-yellow-800 px-2 py-1 rounded">Bitbucket</span> <span class="text-xs bg-yellow-100 text-yellow-800 px-2 py-1 rounded">Pastebin</span> </div> </div> </div> <!-- Feature Card 6 --> <div class="tool-card bg-white rounded-xl shadow-md overflow-hidden border border-gray-100 transition duration-300"> <div class="p-6"> <div class="flex items-center mb-4"> <div class="bg-blue-100 p-3 rounded-full mr-4"> <i class="fas fa-chart-network text-blue-600 text-xl"></i> </div> <h3 class="text-xl font-semibold text-gray-800">Relationship Mapping</h3> </div> <p class="text-gray-600 mb-4">Visualize connections between entities, domains, IPs, and people to uncover hidden relationships and patterns.</p> <div class="flex flex-wrap gap-2"> <span class="text-xs bg-blue-100 text-blue-800 px-2 py-1 rounded">Graph Visualization</span> <span class="text-xs bg-blue-100 text-blue-800 px-2 py-1 rounded">Timeline Analysis</span> <span class="text-xs bg-blue-100 text-blue-800 px-2 py-1 rounded">Geo Mapping</span> </div> </div> </div> </div> </div> </section> <!-- How It Works Section --> <section class="py-16 bg-gray-50"> <div class="container mx-auto px-4"> <h2 class="text-3xl font-bold text-center mb-12 text-gray-800">How CyberSleuth Works</h2> <div class="grid grid-cols-1 md:grid-cols-3 gap-8"> <div class="text-center"> <div class="bg-white p-6 rounded-full w-24 h-24 flex items-center justify-center mx-auto mb-6 shadow-md pulse-animation"> <i class="fas fa-search text-3xl text-indigo-600"></i> </div> <h3 class="text-xl font-semibold mb-3">1. Input Your Target</h3> <p class="text-gray-600">Enter any identifier - username, email, domain, IP address, phone number, or cryptocurrency address.</p> </div> <div class="text-center"> <div class="bg-white p-6 rounded-full w-24 h-24 flex items-center justify-center mx-auto mb-6 shadow-md"> <i class="fas fa-cogs text-3xl text-indigo-600"></i> </div> <h3 class="text-xl font-semibold mb-3">2. Automated OSINT Collection</h3> <p class="text-gray-600">Our system queries hundreds of free sources simultaneously to gather comprehensive data about your target.</p> </div> <div class="text-center"> <div class="bg-white p-6 rounded-full w-24 h-24 flex items-center justify-center mx-auto mb-6 shadow-md"> <i class="fas fa-chart-pie text-3xl text-indigo-600"></i> </div> <h3 class="text-xl font-semibold mb-3">3. Analyze Results</h3> <p class="text-gray-600">Review structured intelligence reports with visualizations, connections, and actionable insights.</p> </div> </div> </div> </section> <!-- Sample Results Section --> <section class="py-16 bg-white"> <div class="container mx-auto px-4"> <h2 class="text-3xl font-bold text-center mb-12 text-gray-800">Sample Investigation Results</h2> <div class="bg-gray-50 rounded-xl p-6 shadow-inner"> <div class="flex items-center justify-between mb-6"> <div> <h3 class="text-xl font-semibold">Target: <span class="text-indigo-600">john_doe</span></h3> <p class="text-gray-500">Username investigation initiated 5 minutes ago</p> </div> <div class="flex space-x-2"> <button class="bg-indigo-100 text-indigo-700 px-4 py-2 rounded-md text-sm font-medium">Export PDF</button> <button class="bg-white border border-gray-300 text-gray-700 px-4 py-2 rounded-md text-sm font-medium">Save Report</button> </div> </div> <div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8"> <div class="bg-white p-4 rounded-lg shadow border-l-4 border-indigo-500"> <h4 class="font-medium text-gray-500 mb-2">Social Media Profiles</h4> <p class="text-2xl font-bold">8</p> <div class="mt-2 flex flex-wrap gap-1"> <span class="text-xs bg-blue-100 text-blue-800 px-2 py-1 rounded">Twitter</span> <span class="text-xs bg-blue-100 text-blue-800 px-2 py-1 rounded">Facebook</span> <span class="text-xs bg-blue-100 text-blue-800 px-2 py-1 rounded">LinkedIn</span> <span class="text-xs bg-blue-100 text-blue-800 px-2 py-1 rounded">GitHub</span> </div> </div> <div class="bg-white p-4 rounded-lg shadow border-l-4 border-green-500"> <h4 class="font-medium text-gray-500 mb-2">Associated Emails</h4> <p class="text-2xl font-bold">3</p> <div class="mt-2 text-sm text-gray-600 truncate">johndoe@gmail.com, jd@example.com, john.doe@company.org</div> </div> <div class="bg-white p-4 rounded-lg shadow border-l-4 border-purple-500"> <h4 class="font-medium text-gray-500 mb-2">Data Breaches</h4> <p class="text-2xl font-bold">2</p> <div class="mt-2 text-sm text-gray-600">LinkedIn (2016), Adobe (2013)</div> </div> </div> <div class="mb-8"> <h4 class="font-semibold text-lg mb-4 flex items-center"> <i class="fas fa-globe-americas text-indigo-600 mr-2"></i> Domain Associations </h4> <div class="bg-white rounded-lg shadow overflow-hidden"> <table class="min-w-full divide-y divide-gray-200"> <thead class="bg-gray-50"> <tr> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Domain</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Registration Date</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Registrar</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th> </tr> </thead> <tbody class="bg-white divide-y divide-gray-200"> <tr class="hover:bg-gray-50"> <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-indigo-600">johndoe.com</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2020-05-15</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Namecheap</td> <td class="px-6 py-4 whitespace-nowrap"> <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Active</span> </td> </tr> <tr class="hover:bg-gray-50"> <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-indigo-600">doe-projects.net</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2018-11-22</td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">GoDaddy</td> <td class="px-6 py-4 whitespace-nowrap"> <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">Expired</span> </td> </tr> </tbody> </table> </div> </div> <div> <h4 class="font-semibold text-lg mb-4 flex items-center"> <i class="fas fa-map-marked-alt text-indigo-600 mr-2"></i> Geographic Footprint </h4> <div class="bg-white p-4 rounded-lg shadow"> <div class="h-64 bg-gray-200 rounded-md flex items-center justify-center"> <p class="text-gray-500">Interactive map visualization would appear here showing locations associated with the target</p> </div> </div> </div> </div> </div> </section> <!-- Free Resources Section --> <section class="py-16 bg-gray-50"> <div class="container mx-auto px-4"> <h2 class="text-3xl font-bold text-center mb-12 text-gray-800">Integrated Free Resources</h2> <div class="grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-4"> <div class="bg-white p-4 rounded-lg shadow-sm flex items-center justify-center h-24"> <img src="https://www.google.com/images/branding/product/1x/google_logo_48dp.png" alt="Google" class="h-8"> </div> <div class="bg-white p-4 rounded-lg shadow-sm flex items-center justify-center h-24"> <img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" alt="GitHub" class="h-8"> </div> <div class="bg-white p-4 rounded-lg shadow-sm flex items-center justify-center h-24"> <img src="https://haveibeenpwned.com/Content/Images/SocialLogo.png" alt="Have I Been Pwned" class="h-8"> </div> <div class="bg-white p-4 rounded-lg shadow-sm flex items-center justify-center h-24"> <img src="https://www.shodan.io/static/img/favicon.png" alt="Shodan" class="h-8"> </div> <div class="bg-white p-4 rounded-lg shadow-sm flex items-center justify-center h-24"> <img src="https://www.virustotal.com/gui/images/vt-enterprise.svg" alt="VirusTotal" class="h-8"> </div> <div class="bg-white p-4 rounded-lg shadow-sm flex items-center justify-center h-24"> <img src="https://www.whois.com/images/logo-whoiscom.png" alt="WHOIS" class="h-8"> </div> <div class="bg-white p-4 rounded-lg shadow-sm flex items-center justify-center h-24"> <img src="https://www.linkedin.com/favicon.ico" alt="LinkedIn" class="h-8"> </div> <div class="bg-white p-4 rounded-lg shadow-sm flex items-center justify-center h-24"> <img src="https://abs.twimg.com/favicons/twitter.ico" alt="Twitter" class="h-8"> </div> <div class="bg-white p-4 rounded-lg shadow-sm flex items-center justify-center h-24"> <img src="https://static.xx.fbcdn.net/rsrc.php/yD/r/d4ZIVX-5C-b.ico" alt="Facebook" class="h-8"> </div> <div class="bg-white p-4 rounded-lg shadow-sm flex items-center justify-center h-24"> <img src="https://www.instagram.com/static/images/ico/favicon.ico/36b3ee2d91ed.ico" alt="Instagram" class="h-8"> </div> <div class="bg-white p-4 rounded-lg shadow-sm flex items-center justify-center h-24"> <img src="https://archive.org/images/glogo.jpg" alt="Wayback Machine" class="h-8"> </div> <div class="bg-white p-4 rounded-lg shadow-sm flex items-center justify-center h-24"> <img src="https://www.redditstatic.com/desktop2x/img/favicon/android-icon-192x192.png" alt="Reddit" class="h-8"> </div> </div> </div> </section> <!-- Login Modal --> <div id="loginModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden"> <div class="bg-white rounded-lg shadow-xl w-full max-w-md"> <div class="p-6"> <div class="flex justify-between items-center mb-4"> <h3 class="text-2xl font-bold text-gray-800">Login to CyberSleuth</h3> <button id="closeLoginModal" class="text-gray-500 hover:text-gray-700"> <i class="fas fa-times"></i> </button> </div> <form id="loginForm" class="space-y-4"> <div> <label for="email" class="block text-sm font-medium text-gray-700">Email</label> <input type="email" id="email" name="email" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"> </div> <div> <label for="password" class="block text-sm font-medium text-gray-700">Password</label> <input type="password" id="password" name="password" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"> </div> <div class="flex items-center justify-between"> <div class="flex items-center"> <input id="remember-me" name="remember-me" type="checkbox" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded"> <label for="remember-me" class="ml-2 block text-sm text-gray-700">Remember me</label> </div> <div class="text-sm"> <a href="#" class="font-medium text-indigo-600 hover:text-indigo-500">Forgot password?</a> </div> </div> <div> <button type="submit" class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"> Sign in </button> </div> </form> <div class="mt-4 text-center text-sm"> <p class="text-gray-600">Don't have an account? <a href="#" id="showRegisterModal" class="font-medium text-indigo-600 hover:text-indigo-500">Register</a></p> </div> </div> </div> </div> <!-- Register Modal --> <div id="registerModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden"> <div class="bg-white rounded-lg shadow-xl w-full max-w-md"> <div class="p-6"> <div class="flex justify-between items-center mb-4"> <h3 class="text-2xl font-bold text-gray-800">Create Account</h3> <button id="closeRegisterModal" class="text-gray-500 hover:text-gray-700"> <i class="fas fa-times"></i> </button> </div> <form id="registerForm" class="space-y-4"> <div> <label for="reg-email" class="block text-sm font-medium text-gray-700">Email</label> <input type="email" id="reg-email" name="email" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"> </div> <div> <label for="reg-password" class="block text-sm font-medium text-gray-700">Password</label> <input type="password" id="reg-password" name="password" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"> </div> <div> <label for="confirm-password" class="block text-sm font-medium text-gray-700">Confirm Password</label> <input type="password" id="confirm-password" name="confirm-password" required class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"> </div> <div> <button type="submit" class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"> Register </button> </div> </form> </div> </div> </div> <!-- Database Connection Script --> <script> // Connect to database (example using localStorage for demo) const DB_NAME = 'cybersleuth_users'; // Initialize database if not exists if (!localStorage.getItem(DB_NAME)) { localStorage.setItem(DB_NAME, JSON.stringify({ users: [] })); } // Get database function getDB() { return JSON.parse(localStorage.getItem(DB_NAME)); } // Save to database function saveDB(data) { localStorage.setItem(DB_NAME, JSON.stringify(data)); } // Login form handler document.getElementById('loginForm').addEventListener('submit', function(e) { e.preventDefault(); const email = document.getElementById('email').value; const password = document.getElementById('password').value; const db = getDB(); const user = db.users.find(u => u.email === email && u.password === password); if (user) { alert('Login successful!'); document.getElementById('loginModal').classList.add('hidden'); // Here you would typically set a session token or redirect } else { alert('Invalid credentials'); } }); // Register form handler document.getElementById('registerForm').addEventListener('submit', function(e) { e.preventDefault(); const email = document.getElementById('reg-email').value; const password = document.getElementById('reg-password').value; const confirmPassword = document.getElementById('confirm-password').value; if (password !== confirmPassword) { alert('Passwords do not match'); return; } const db = getDB(); if (db.users.some(u => u.email === email)) { alert('Email already registered'); return; } db.users.push({ email, password }); saveDB(db); alert('Registration successful! Please login.'); document.getElementById('registerModal').classList.add('hidden'); document.getElementById('loginModal').classList.remove('hidden'); }); // Modal controls document.querySelectorAll('[id^="show"]').forEach(btn => { btn.addEventListener('click', function() { const modalId = this.id.replace('show', '').toLowerCase() + 'Modal'; document.getElementById(modalId).classList.remove('hidden'); }); }); document.querySelectorAll('[id^="close"]').forEach(btn => { btn.addEventListener('click', function() { const modalId = this.id.replace('close', ''); document.getElementById(modalId).classList.add('hidden'); }); }); // Open login modal when login button clicked document.querySelector('button.bg-white.text-indigo-600').addEventListener('click', function() { document.getElementById('loginModal').classList.remove('hidden'); }); // Open register modal when sign up button clicked document.querySelector('button.bg-indigo-800.text-white').addEventListener('click', function() { document.getElementById('registerModal').classList.remove('hidden'); }); </script> </html> - Initial Deployment
Verified signaturece938c7 -
initial commit
Verified signature609a24e