-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
394 lines (354 loc) · 18.3 KB
/
Copy pathindex.html
File metadata and controls
394 lines (354 loc) · 18.3 KB
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
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Manthan — talk to your codebase</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
--bg: #f6f5f2;
--fg: #1c1c1a;
--dim: #6b6b63;
--muted: #a5a59d;
--accent: #c94b1e;
--line: #e3e1da;
--white: #ffffff;
--radius: 10px;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
background: var(--bg);
color: var(--fg);
line-height: 1.6;
-webkit-font-smoothing: antialiased;
overflow-x: hidden;
}
.w { max-width: 800px; margin: 0 auto; padding: 0 32px; }
nav { display: flex; align-items: center; justify-content: space-between; height: 56px; border-bottom: 1px solid var(--line); }
.logo { font-weight: 700; font-size: 16px; color: var(--accent); }
.nav-r { display: flex; gap: 20px; }
.nav-r a { text-decoration: none; font-size: 14px; color: var(--dim); font-weight: 500; transition: color 0.15s; }
.nav-r a:hover { color: var(--fg); }
.hero { padding: 80px 0 56px; text-align: center; }
.hero h1 { font-size: clamp(52px, 9vw, 96px); font-weight: 800; line-height: 0.9; letter-spacing: -0.03em; margin-bottom: 16px; }
.hero h1 span { color: var(--accent); }
.hero p { font-size: 16px; color: var(--dim); max-width: 480px; margin: 0 auto 32px; }
.s {
display: flex; align-items: center; gap: 10px;
padding: 13px 18px; border-radius: var(--radius);
border: 1px solid var(--line); background: var(--white);
max-width: 560px; margin: 0 auto;
}
.s svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--muted); }
.s .c { font-size: 15px; color: var(--dim); min-height: 22px; position: relative; }
.s .c .cursor {
display: inline-block; width: 1.5px; height: 16px;
background: var(--accent); margin-left: 1px; vertical-align: text-bottom;
transition: opacity 0.2s;
}
.s .c .cursor.blink { animation: bl 0.9s step-end infinite; }
@keyframes bl { 50% { opacity: 0; } }
.demo { margin-top: 40px; text-align: left; min-height: 280px; }
.msg { display: flex; gap: 16px; padding: 22px 0; transition: opacity 0.5s ease, transform 0.5s ease; }
.msg + .msg { border-top: 1px solid var(--line); }
.msg.hidden { opacity: 0; transform: translateY(8px); pointer-events: none; }
.msg.visible { opacity: 1; transform: translateY(0); }
.av {
width: 34px; height: 34px; border-radius: 8px;
flex-shrink: 0; display: flex; align-items: center; justify-content: center;
margin-top: 2px;
}
.av.u { background: #f0ebe4; color: var(--accent); }
.av.a { background: var(--fg); color: var(--bg); }
.av svg { width: 20px; height: 20px; }
.b { flex: 1; font-size: 15px; color: var(--dim); line-height: 1.7; min-width: 0; word-break: break-word; overflow-wrap: break-word; }
.b strong { color: var(--fg); font-weight: 600; }
.b code {
padding: 0 4px; border-radius: 3px;
font-size: 13px; color: var(--accent);
word-break: break-all;
}
.refs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.refs a {
font-size: 11px; padding: 3px 9px; border-radius: 5px;
border: 1px solid var(--line); background: var(--white);
color: var(--muted); text-decoration: none; transition: 0.15s;
}
.refs a:hover { border-color: var(--accent); color: var(--accent); }
.try-btn-wrap { padding: 24px 0 0; text-align: right; }
section { padding: 48px 0; }
section + section { border-top: 1px solid var(--line); }
.st { font-weight: 700; font-size: 17px; margin-bottom: 18px; }
.fi { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; }
.fi + .fi { border-top: 1px solid var(--line); }
.fi svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--accent); margin-top: 3px; }
.fi h3 { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.fi p { font-size: 14px; color: var(--dim); }
.stp { display: flex; gap: 18px; padding: 20px 0; }
.stp + .stp { border-top: 1px solid var(--line); }
.stp .num { font-size: 26px; font-weight: 800; color: var(--accent); line-height: 1; width: 30px; flex-shrink: 0; }
.stp h3 { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.stp p { font-size: 14px; color: var(--dim); }
.cta-wrap {
background: var(--white);
border: 1px solid var(--line);
border-radius: 12px;
padding: 40px;
text-align: center;
}
.cta-wrap .st { margin-bottom: 8px; }
.cta-wrap .sub { font-size: 14px; color: var(--dim); margin-bottom: 20px; }
.code-box {
display: flex; align-items: center; justify-content: space-between;
padding: 14px 18px; border-radius: 8px;
background: var(--bg); border: 1px solid var(--line);
font-size: 13px; color: var(--dim);
gap: 14px; text-align: left;
font-family: "SF Mono", SFMono-Regular, ui-monospace, Consolas, monospace;
}
.code-box code { flex: 1; word-break: break-all; }
.code-box .cp {
border: none; background: none;
font-size: 12px; font-family: inherit;
color: var(--muted); cursor: pointer; white-space: nowrap;
font-weight: 500; transition: color 0.15s;
}
.code-box .cp:hover { color: var(--accent); }
.btn-row { display: flex; gap: 10px; justify-content: center; margin-top: 22px; }
.btn {
display: inline-flex; align-items: center; gap: 6px;
padding: 11px 24px; border-radius: 8px;
font-family: inherit; font-size: 14px; font-weight: 600;
text-decoration: none; border: none; cursor: pointer; transition: 0.15s;
}
.btn-p { background: var(--accent); color: var(--white); }
.btn-p:hover { background: #b8431a; }
.btn-s { background: transparent; color: var(--dim); border: 1px solid var(--line); }
.btn-s:hover { border-color: var(--muted); color: var(--fg); }
footer {
border-top: 1px solid var(--line); padding: 28px 0;
display: flex; justify-content: space-between; align-items: center;
font-size: 13px; color: var(--muted); max-width: 800px; margin: 0 auto; padding-left: 32px; padding-right: 32px;
}
footer a { color: var(--dim); text-decoration: none; margin-left: 16px; }
footer a:hover { color: var(--fg); }
@media (max-width: 640px) {
.w { padding: 0 20px; }
.cta-wrap { padding: 24px 20px; }
.btn-row { flex-direction: column; }
.btn-row .btn { justify-content: center; }
footer { flex-direction: column; gap: 6px; text-align: center; padding-left: 20px; padding-right: 20px; }
footer a { margin: 0 8px; }
.code-box { flex-direction: column; align-items: stretch; gap: 8px; }
}
</style>
</head>
<body>
<nav class="w">
<div class="logo">Manthan</div>
<div class="nav-r">
<a href="#f">Features</a>
<a href="#h">How it works</a>
<a href="https://github.com/DevLikhith5/manthan" target="_blank">GitHub</a>
</div>
</nav>
<div class="w">
<div class="hero">
<h1><span>M</span>anthan</h1>
<p>Natural language search for your codebase. Ask in English, get answers with source citations — all local, all private.</p>
<div class="s">
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5">
<path stroke-linecap="round" stroke-linejoin="round" d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z" />
</svg>
<span class="c" id="tw"><span id="twText"></span><span class="cursor blink" id="cursor"></span></span>
</div>
<div class="demo" id="demo">
<div class="msg visible" id="mq">
<div class="av u">
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5">
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z" />
</svg>
</div>
<div class="b" id="mqText">how does hybrid search work here?</div>
</div>
<div class="msg visible" id="ma">
<div class="av a">
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5">
<path stroke-linecap="round" stroke-linejoin="round" d="M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.455 2.456L21.75 6l-1.036.259a3.375 3.375 0 0 0-2.455 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z" />
</svg>
</div>
<div class="b" id="maBody">
Combines <strong>dense vector search</strong> (Qdrant + sentence-transformers) with <strong>BM25 sparse retrieval</strong> using Reciprocal Rank Fusion. <code>hybrid_search()</code> merges results from both paths, applies exact-match boosting, and computes a confidence score based on score gaps and evidence diversity.
<div class="refs">
<a href="#">codesearch/api/app/adapter/retrieval/fusion.py:205</a>
<a href="#">codesearch/api/app/adapter/retrieval/fusion.py:163</a>
<a href="#">codesearch/api/app/adapter/retrieval/sparse.py:8</a>
</div>
</div>
</div>
<div class="try-btn-wrap">
<a href="#" class="btn btn-p">Try it on your codebase</a>
</div>
</div>
</div>
</div>
<section id="f">
<div class="w">
<div class="st">What it does</div>
<div class="fi">
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"/></svg>
<div><h3>Semantic search</h3><p>Finds code by intent, not keywords. Understands what you mean without exact names.</p></div>
</div>
<div class="fi">
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z"/></svg>
<div><h3>Local & private</h3><p>Everything runs locally. Code never leaves your machine. No SaaS, no data leaks.</p></div>
</div>
<div class="fi">
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M2.25 7.125C2.25 6.504 2.754 6 3.375 6h6c.621 0 1.125.504 1.125 1.125v3.75c0 .621-.504 1.125-1.125 1.125h-6a1.125 1.125 0 0 1-1.125-1.125v-3.75ZM14.25 8.625c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v8.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 0 1-1.125-1.125v-8.25ZM3.75 16.125c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v2.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 0 1-1.125-1.125v-2.25Z"/></svg>
<div><h3>Multi-repo</h3><p>Index and search across multiple repos. Monorepos, microservices — all work.</p></div>
</div>
<div class="fi">
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"/></svg>
<div><h3>Citation-backed answers</h3><p>Every answer includes exact file paths and line numbers. Click to open source.</p></div>
</div>
</div>
</section>
<section id="h">
<div class="w">
<div class="st">How it works</div>
<div class="stp"><div class="num">1</div><div><h3>Clone & index</h3><p>Add a repo. Manthan clones it locally and builds a hybrid search index (embeddings + BM25).</p></div></div>
<div class="stp"><div class="num">2</div><div><h3>Ask in English</h3><p>Type questions like "how does auth work". No regex, no query language — just plain English.</p></div></div>
<div class="stp"><div class="num">3</div><div><h3>Get answers with sources</h3><p>Synthesized answer with exact file paths and line numbers. Click any citation to open.</p></div></div>
</div>
</section>
<section>
<div class="w">
<div class="cta-wrap">
<div class="st">Try it yourself</div>
<p class="sub">No Docker. No signup. Python + SQLite + React.</p>
<div class="code-box">
<code>git clone https://github.com/DevLikhith5/manthan.git && cd codesearch && docker compose up -d</code>
<button class="cp" onclick="copyCmd(this)" title="Copy command">
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5" width="16" height="16">
<path stroke-linecap="round" stroke-linejoin="round" d="M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 0 1-.75.75H9a.75.75 0 0 1-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 0 1 1.927-.184" />
</svg>
</button>
</div>
<div class="btn-row">
<a href="#" class="btn btn-p">Get started</a>
<a href="#" class="btn btn-s">View on GitHub</a>
</div>
</div>
</div>
</section>
<footer>
<span>Manthan — talk to your codebase</span>
<span><a href="https://github.com/DevLikhith5/manthan">GitHub</a><a href="#">Docs</a></span>
</footer>
<script>
const DEMOS = [
{
query: 'how does hybrid search work here?',
answer: 'Combines <strong>dense vector search</strong> (Qdrant + sentence-transformers) with <strong>BM25 sparse retrieval</strong> using Reciprocal Rank Fusion. <code>hybrid_search()</code> merges results from both paths, applies exact-match boosting, and computes a confidence score based on score gaps and evidence diversity.',
refs: ['codesearch/api/app/adapter/retrieval/fusion.py:205', 'codesearch/api/app/adapter/retrieval/fusion.py:163', 'codesearch/api/app/adapter/retrieval/sparse.py:8']
},
{
query: 'find the rate limiter implementation',
answer: 'A <strong>token-bucket rate limiter</strong> in <code>rate_limiter.py</code>. <code>PerClientRateLimiter</code> maintains one <code>TokenBucket</code> per client key, refilling tokens at a configurable rate. Default limit is 120 req/min with burst of 200, set in <code>config.py</code>.',
refs: ['codesearch/api/app/infra/rate_limiter.py:28', 'codesearch/api/app/infra/rate_limiter.py:8', 'codesearch/api/app/config.py:27']
},
{
query: 'how does citation verification work?',
answer: '<code>_verify_citations()</code> cross-references every <code>[file:line]</code> citation in the LLM answer against the actual retrieved chunks. If any citation can\'t be validated, a warning is appended listing only verified sources.',
refs: ['codesearch/api/app/service/search_service.py:154', 'codesearch/api/app/service/search_service.py:258', 'codesearch/api/app/domain/entities.py:3']
}
];
const twText = document.getElementById('twText');
const cursor = document.getElementById('cursor');
const mq = document.getElementById('mq');
const ma = document.getElementById('ma');
const mqText = document.getElementById('mqText');
const maBody = document.getElementById('maBody');
let idx = 0, ci = 0, phase = 'type';
function setContent(i) {
const d = DEMOS[i];
mqText.textContent = d.query;
maBody.innerHTML = d.answer + '<div class="refs"></div>';
const r = maBody.querySelector('.refs');
d.refs.forEach(ref => {
const a = document.createElement('a');
a.href = '#';
a.textContent = ref;
r.appendChild(a);
});
}
function showMessages() {
mq.classList.remove('hidden');
mq.classList.add('visible');
ma.classList.remove('hidden');
ma.classList.add('visible');
}
function hideMessages() {
mq.classList.remove('visible');
mq.classList.add('hidden');
ma.classList.remove('visible');
ma.classList.add('hidden');
}
setContent(0);
showMessages();
/*
Phase flow:
type → type out query in search bar
hold → query fully typed, messages showing, pause
clear → delete search bar text + hide messages (simultaneous)
wait → brief empty pause before next cycle
*/
function loop() {
if (phase === 'type') {
const q = DEMOS[idx].query;
if (ci <= q.length) {
twText.textContent = q.slice(0, ci++);
cursor.className = ci > q.length ? 'cursor' : 'cursor blink';
setTimeout(loop, 35);
} else {
cursor.className = 'cursor blink';
phase = 'hold';
setTimeout(loop, 2200);
}
} else if (phase === 'hold') {
cursor.className = 'cursor';
phase = 'clear';
loop();
} else if (phase === 'clear') {
const q = DEMOS[idx].query;
if (ci >= 0) {
twText.textContent = q.slice(0, ci--);
if (ci === -1) hideMessages();
setTimeout(loop, 12);
} else {
phase = 'wait';
setTimeout(loop, 400);
}
} else if (phase === 'wait') {
idx = (idx + 1) % DEMOS.length;
ci = 0;
setContent(idx);
showMessages();
phase = 'type';
setTimeout(loop, 600);
}
}
loop();
function copyCmd(b) {
const t = b.parentElement.querySelector('code').textContent.trim();
const svg = b.querySelector('svg');
navigator.clipboard.writeText(t).then(() => {
const orig = b.innerHTML;
b.innerHTML = '<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5" width="16" height="16"><path stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"/></svg>';
setTimeout(() => b.innerHTML = orig, 2000);
});
}
</script>
</body>
</html>