termsearch 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +205 -0
- package/bin/termsearch.js +433 -0
- package/config.example.json +31 -0
- package/frontend/dist/app.js +1051 -0
- package/frontend/dist/icon-192.png +0 -0
- package/frontend/dist/icon-512.png +0 -0
- package/frontend/dist/icon.svg +8 -0
- package/frontend/dist/index.html +28 -0
- package/frontend/dist/manifest.json +40 -0
- package/frontend/dist/opensearch.xml +8 -0
- package/frontend/dist/style.css +756 -0
- package/package.json +48 -0
- package/scripts/postinstall.js +84 -0
- package/src/ai/orchestrator.js +163 -0
- package/src/ai/providers/openai-compat.js +255 -0
- package/src/ai/query.js +54 -0
- package/src/ai/summary.js +120 -0
- package/src/api/middleware.js +91 -0
- package/src/api/routes.js +461 -0
- package/src/autostart/manager.js +207 -0
- package/src/config/defaults.js +62 -0
- package/src/config/manager.js +188 -0
- package/src/fetch/document.js +297 -0
- package/src/fetch/ssrf-guard.js +40 -0
- package/src/profiler/scanner.js +212 -0
- package/src/search/cache.js +119 -0
- package/src/search/engine.js +231 -0
- package/src/search/providers/brave.js +57 -0
- package/src/search/providers/duckduckgo.js +148 -0
- package/src/search/providers/mojeek.js +56 -0
- package/src/search/providers/searxng.js +53 -0
- package/src/search/providers/wikipedia.js +70 -0
- package/src/search/ranking.js +155 -0
- package/src/server.js +68 -0
- package/src/social/scrapers.js +356 -0
- package/src/social/search.js +77 -0
- package/src/torrent/scrapers.js +125 -0
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img" aria-label="TermSearch icon">
|
|
2
|
+
<rect width="64" height="64" rx="16" fill="#0d0d0d"/>
|
|
3
|
+
<!-- Magnifying glass -->
|
|
4
|
+
<circle cx="26" cy="26" r="13" fill="none" stroke="#4a9eff" stroke-width="5"/>
|
|
5
|
+
<line x1="35" y1="35" x2="50" y2="50" stroke="#4a9eff" stroke-width="5" stroke-linecap="round"/>
|
|
6
|
+
<!-- Terminal cursor -->
|
|
7
|
+
<rect x="10" y="50" width="9" height="6" rx="1.5" fill="#4a9eff" opacity="0.75"/>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
|
6
|
+
<meta name="mobile-web-app-capable" content="yes" />
|
|
7
|
+
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
8
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
|
9
|
+
<meta name="apple-mobile-web-app-title" content="TermSearch" />
|
|
10
|
+
<meta name="theme-color" content="#0d0d0d" />
|
|
11
|
+
<meta name="description" content="TermSearch — personal search engine, privacy-first, local-first" />
|
|
12
|
+
<title>TermSearch</title>
|
|
13
|
+
<link rel="manifest" href="/manifest.json" />
|
|
14
|
+
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="TermSearch" />
|
|
15
|
+
<link rel="icon" href="/icon.svg" type="image/svg+xml" />
|
|
16
|
+
<link rel="stylesheet" href="/style.css" />
|
|
17
|
+
<script>
|
|
18
|
+
// Apply saved theme before page renders (prevents flash)
|
|
19
|
+
if (localStorage.getItem('ts-theme') === 'light') document.documentElement.classList.add('light');
|
|
20
|
+
// Deregister old service workers
|
|
21
|
+
if ('serviceWorker' in navigator) navigator.serviceWorker.getRegistrations().then(r => r.forEach(sw => sw.unregister()));
|
|
22
|
+
</script>
|
|
23
|
+
</head>
|
|
24
|
+
<body>
|
|
25
|
+
<div id="app"></div>
|
|
26
|
+
<script type="module" src="/app.js"></script>
|
|
27
|
+
</body>
|
|
28
|
+
</html>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "TermSearch",
|
|
3
|
+
"short_name": "TermSearch",
|
|
4
|
+
"description": "Personal search engine — privacy-first, local-first",
|
|
5
|
+
"start_url": "/",
|
|
6
|
+
"display": "standalone",
|
|
7
|
+
"background_color": "#0d0d0d",
|
|
8
|
+
"theme_color": "#0d0d0d",
|
|
9
|
+
"orientation": "any",
|
|
10
|
+
"scope": "/",
|
|
11
|
+
"lang": "en",
|
|
12
|
+
"icons": [
|
|
13
|
+
{
|
|
14
|
+
"src": "/icon-192.png",
|
|
15
|
+
"sizes": "192x192",
|
|
16
|
+
"type": "image/png",
|
|
17
|
+
"purpose": "any maskable"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"src": "/icon-512.png",
|
|
21
|
+
"sizes": "512x512",
|
|
22
|
+
"type": "image/png",
|
|
23
|
+
"purpose": "any maskable"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"src": "/icon.svg",
|
|
27
|
+
"sizes": "any",
|
|
28
|
+
"type": "image/svg+xml",
|
|
29
|
+
"purpose": "any"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"shortcuts": [
|
|
33
|
+
{
|
|
34
|
+
"name": "New search",
|
|
35
|
+
"url": "/",
|
|
36
|
+
"icons": [{ "src": "/icon-192.png", "sizes": "192x192" }]
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"categories": ["search", "utilities"]
|
|
40
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
|
|
3
|
+
<ShortName>TermSearch</ShortName>
|
|
4
|
+
<Description>TermSearch — personal search engine</Description>
|
|
5
|
+
<InputEncoding>UTF-8</InputEncoding>
|
|
6
|
+
<Image height="64" width="64" type="image/svg+xml">/icon.svg</Image>
|
|
7
|
+
<Url type="text/html" method="get" template="http://localhost:3000/#/?q={searchTerms}"/>
|
|
8
|
+
</OpenSearchDescription>
|