File size: 15,530 Bytes
1a36166
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
<!DOCTYPE html>
<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>