Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>LeadMind AI - Backend Architecture</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"> | |
| </head> | |
| <body class="bg-gray-50 font-sans"> | |
| <div class="min-h-screen flex"> | |
| <!-- Sidebar --> | |
| <aside class="w-64 bg-white shadow-md hidden md:block"> | |
| <nav class="p-4"> | |
| <div class="mb-8"> | |
| <h2 class="text-gray-500 uppercase text-xs font-semibold tracking-wider mb-4">Navigation</h2> | |
| <ul class="space-y-2"> | |
| <li> | |
| <a href="index.html" class="flex items-center space-x-2 text-gray-600 hover:text-purple-600 hover:bg-purple-50 rounded-lg px-3 py-2"> | |
| <i class="fas fa-home"></i> | |
| <span>Dashboard</span> | |
| </a> | |
| </li> | |
| <li> | |
| <a href="backend.html" class="flex items-center space-x-2 text-purple-600 bg-purple-50 rounded-lg px-3 py-2"> | |
| <i class="fas fa-server"></i> | |
| <span>Backend</span> | |
| </a> | |
| </li> | |
| </ul> | |
| </div> | |
| </nav> | |
| </aside> | |
| <!-- Main Content --> | |
| <main class="flex-1 p-8 overflow-auto"> | |
| <div class="max-w-6xl mx-auto"> | |
| <h1 class="text-3xl font-bold text-gray-800 mb-6">Backend Architecture</h1> | |
| <!-- Architecture Diagram --> | |
| <div class="bg-white rounded-xl shadow-md p-6 mb-8"> | |
| <h2 class="text-xl font-bold mb-4">System Architecture</h2> | |
| <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4"> | |
| <!-- Client Layer --> | |
| <div class="bg-purple-50 p-4 rounded-lg border border-purple-200"> | |
| <div class="flex items-center mb-2"> | |
| <i class="fas fa-laptop-code text-purple-600 mr-2"></i> | |
| <h3 class="font-semibold">Client Layer</h3> | |
| </div> | |
| <ul class="text-sm space-y-1"> | |
| <li>Web Dashboard</li> | |
| <li>Mobile Apps</li> | |
| <li>Third-party Apps</li> | |
| </ul> | |
| </div> | |
| <!-- API Layer --> | |
| <div class="bg-blue-50 p-4 rounded-lg border border-blue-200"> | |
| <div class="flex items-center mb-2"> | |
| <i class="fas fa-network-wired text-blue-600 mr-2"></i> | |
| <h3 class="font-semibold">API Layer</h3> | |
| </div> | |
| <ul class="text-sm space-y-1"> | |
| <li>REST API</li> | |
| <li>GraphQL</li> | |
| <li>WebSockets</li> | |
| </ul> | |
| </div> | |
| <!-- Service Layer --> | |
| <div class="bg-green-50 p-4 rounded-lg border border-green-200"> | |
| <div class="flex items-center mb-2"> | |
| <i class="fas fa-cogs text-green-600 mr-2"></i> | |
| <h3 class="font-semibold">Service Layer</h3> | |
| </div> | |
| <ul class="text-sm space-y-1"> | |
| <li>AI Processing</li> | |
| <li>Auth Service</li> | |
| <li>Analytics</li> | |
| </ul> | |
| </div> | |
| <!-- Data Layer --> | |
| <div class="bg-yellow-50 p-4 rounded-lg border border-yellow-200"> | |
| <div class="flex items-center mb-2"> | |
| <i class="fas fa-database text-yellow-600 mr-2"></i> | |
| <h3 class="font-semibold">Data Layer</h3> | |
| </div> | |
| <ul class="text-sm space-y-1"> | |
| <li>PostgreSQL</li> | |
| <li>MongoDB</li> | |
| <li>Redis</li> | |
| </ul> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Technology Stack --> | |
| <div class="bg-white rounded-xl shadow-md p-6 mb-8"> | |
| <h2 class="text-xl font-bold mb-4">Technology Stack</h2> | |
| <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"> | |
| <!-- Languages/Frameworks --> | |
| <div class="border rounded-lg p-4"> | |
| <div class="flex items-center mb-3"> | |
| <i class="fas fa-code text-purple-600 mr-2"></i> | |
| <h3 class="font-semibold">Languages/Frameworks</h3> | |
| </div> | |
| <div class="space-y-2"> | |
| <div class="bg-gray-50 p-2 rounded flex items-center"> | |
| <img src="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/nodejs/nodejs-original.svg" class="w-5 h-5 mr-2" /> | |
| <span>Node.js (Express)</span> | |
| </div> | |
| <div class="bg-gray-50 p-2 rounded flex items-center"> | |
| <img src="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/python/python-original.svg" class="w-5 h-5 mr-2" /> | |
| <span>Python (FastAPI)</span> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Databases --> | |
| <div class="border rounded-lg p-4"> | |
| <div class="flex items-center mb-3"> | |
| <i class="fas fa-database text-blue-600 mr-2"></i> | |
| <h3 class="font-semibold">Databases</h3> | |
| </div> | |
| <div class="space-y-2"> | |
| <div class="bg-gray-50 p-2 rounded flex items-center"> | |
| <img src="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/postgresql/postgresql-original.svg" class="w-5 h-5 mr-2" /> | |
| <span>PostgreSQL</span> | |
| </div> | |
| <div class="bg-gray-50 p-2 rounded flex items-center"> | |
| <img src="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/mongodb/mongodb-original.svg" class="w-5 h-5 mr-2" /> | |
| <span>MongoDB</span> | |
| </div> | |
| <div class="bg-gray-50 p-2 rounded flex items-center"> | |
| <img src="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/redis/redis-original.svg" class="w-5 h-5 mr-2" /> | |
| <span>Redis</span> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Infrastructure --> | |
| <div class="border rounded-lg p-4"> | |
| <div class="flex items-center mb-3"> | |
| <i class="fas fa-cloud text-green-600 mr-2"></i> | |
| <h3 class="font-semibold">Infrastructure</h3> | |
| </div> | |
| <div class="space-y-2"> | |
| <div class="bg-gray-50 p-2 rounded flex items-center"> | |
| <img src="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/docker/docker-original.svg" class="w-5 h-5 mr-2" /> | |
| <span>Docker</span> | |
| </div> | |
| <div class="bg-gray-50 p-2 rounded flex items-center"> | |
| <img src="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/kubernetes/kubernetes-plain.svg" class="w-5 h-5 mr-2" /> | |
| <span>Kubernetes</span> | |
| </div> | |
| <div class="bg-gray-50 p-2 rounded flex items-center"> | |
| <img src="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/amazonwebservices/amazonwebservices-original.svg" class="w-5 h-5 mr-2" /> | |
| <span>AWS</span> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- API Endpoints --> | |
| <div class="bg-white rounded-xl shadow-md p-6 mb-8"> | |
| <h2 class="text-xl font-bold mb-4">API Endpoints</h2> | |
| <div class="overflow-x-auto"> | |
| <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">Method</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Endpoint</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Description</th> | |
| </tr> | |
| </thead> | |
| <tbody class="bg-white divide-y divide-gray-200"> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-mono text-purple-600">POST</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-mono">/api/auth/login</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm">User authentication</td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-mono text-blue-600">GET</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-mono">/api/conversations</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm">List conversations</td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-mono text-green-600">POST</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-mono">/api/ai/process</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm">Process AI request</td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| <!-- Authentication --> | |
| <div class="bg-white rounded-xl shadow-md p-6"> | |
| <h2 class="text-xl font-bold mb-4">Authentication Flow</h2> | |
| <div class="bg-gray-50 p-4 rounded-lg"> | |
| <div class="flex items-start mb-4"> | |
| <div class="bg-blue-100 p-2 rounded-full mr-4"> | |
| <i class="fas fa-user text-blue-600"></i> | |
| </div> | |
| <div> | |
| <h3 class="font-semibold">JWT Authentication</h3> | |
| <p class="text-sm text-gray-600 mt-1">Secure stateless authentication using JSON Web Tokens</p> | |
| </div> | |
| </div> | |
| <ol class="space-y-4"> | |
| <li class="flex items-start"> | |
| <span class="bg-purple-100 text-purple-600 text-xs font-semibold rounded-full h-6 w-6 flex items-center justify-center mr-3 mt-0.5">1</span> | |
| <div> | |
| <p class="font-medium">Client Login</p> | |
| <p class="text-sm text-gray-600 mt-1">User submits credentials to /api/auth/login</p> | |
| </div> | |
| </li> | |
| <li class="flex items-start"> | |
| <span class="bg-purple-100 text-purple-600 text-xs font-semibold rounded-full h-6 w-6 flex items-center justify-center mr-3 mt-0.5">2</span> | |
| <div> | |
| <p class="font-medium">Token Generation</p> | |
| <p class="text-sm text-gray-600 mt-1">Server validates credentials and returns JWT</p> | |
| </div> | |
| </li> | |
| <li class="flex items-start"> | |
| <span class="bg-purple-100 text-purple-600 text-xs font-semibold rounded-full h-6 w-6 flex items-center justify-center mr-3 mt-0.5">3</span> | |
| <div> | |
| <p class="font-medium">API Requests</p> | |
| <p class="text-sm text-gray-600 mt-1">Client includes token in Authorization header</p> | |
| </div> | |
| </li> | |
| <li class="flex items-start"> | |
| <span class="bg-purple-100 text-purple-600 text-xs font-semibold rounded-full h-6 w-6 flex items-center justify-center mr-3 mt-0.5">4</span> | |
| <div> | |
| <p class="font-medium">Token Validation</p> | |
| <p class="text-sm text-gray-600 mt-1">Middleware verifies token before processing request</p> | |
| </div> | |
| </li> | |
| </ol> | |
| </div> | |
| </div> | |
| </div> | |
| </main> | |
| </div> | |
| <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=stakmodsco/leadmind-ai" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |