wacrawl-dashboard 0.1.1
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/README.md +133 -0
- package/apps/api/dist/db.js +29 -0
- package/apps/api/dist/index.js +115 -0
- package/apps/api/dist/lib/displayName.js +28 -0
- package/apps/api/dist/lib/mediaFsPath.js +80 -0
- package/apps/api/dist/lib/query.js +71 -0
- package/apps/api/dist/lib/searchIndex.js +57 -0
- package/apps/api/dist/lib/timezone.js +38 -0
- package/apps/api/dist/lib/wordCloudUsefulStopWords.js +118 -0
- package/apps/api/dist/pathsResolve.js +142 -0
- package/apps/api/dist/routes/data.js +417 -0
- package/apps/api/dist/routes/settings.js +38 -0
- package/apps/api/dist/routes/stats.js +388 -0
- package/apps/api/dist/runtimePaths.js +10 -0
- package/apps/api/dist/scripts/optimizeDb.js +14 -0
- package/apps/api/dist/types.js +1 -0
- package/apps/web/dist/assets/index-1fGu93mF.css +1 -0
- package/apps/web/dist/assets/index-Dfsoi6vG.js +43 -0
- package/apps/web/dist/index.html +13 -0
- package/bin/wacrawl-dashboard.js +41 -0
- package/package.json +56 -0
|
@@ -0,0 +1,13 @@
|
|
|
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" />
|
|
6
|
+
<title>WaCrawl Dashboard</title>
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-Dfsoi6vG.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="/assets/index-1fGu93mF.css">
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div id="root"></div>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const { spawn } = require('node:child_process');
|
|
5
|
+
const { join } = require('node:path');
|
|
6
|
+
const { existsSync } = require('node:fs');
|
|
7
|
+
|
|
8
|
+
const pkgRoot = join(__dirname, '..');
|
|
9
|
+
const apiEntry = join(pkgRoot, 'apps', 'api', 'dist', 'index.js');
|
|
10
|
+
const webDist = join(pkgRoot, 'apps', 'web', 'dist');
|
|
11
|
+
|
|
12
|
+
if (!existsSync(apiEntry)) {
|
|
13
|
+
console.error(
|
|
14
|
+
'wacrawl-dashboard: build artifacts missing.\n' +
|
|
15
|
+
'Run `npm run build` inside the repository first, then try again.'
|
|
16
|
+
);
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const PORT = process.env.PORT ?? '3001';
|
|
21
|
+
const url = `http://127.0.0.1:${PORT}`;
|
|
22
|
+
|
|
23
|
+
console.log(`WaCrawl Dashboard → ${url}`);
|
|
24
|
+
if (!process.env.WACRAWL_DB) {
|
|
25
|
+
console.log(' Database: ~/.wacrawl/wacrawl.db (override with WACRAWL_DB=<path>)');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const child = spawn(process.execPath, [apiEntry], {
|
|
29
|
+
stdio: 'inherit',
|
|
30
|
+
env: {
|
|
31
|
+
...process.env,
|
|
32
|
+
WACRAWL_STATIC_DIR: webDist,
|
|
33
|
+
PORT,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
child.on('exit', (code) => process.exit(code ?? 0));
|
|
38
|
+
|
|
39
|
+
for (const sig of ['SIGINT', 'SIGTERM']) {
|
|
40
|
+
process.on(sig, () => child.kill(sig));
|
|
41
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "wacrawl-dashboard",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Local WhatsApp analytics dashboard powered by a WaCrawl SQLite archive",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"whatsapp",
|
|
7
|
+
"analytics",
|
|
8
|
+
"dashboard",
|
|
9
|
+
"wacrawl",
|
|
10
|
+
"sqlite"
|
|
11
|
+
],
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/greenido/wacrawl-ui.git"
|
|
16
|
+
},
|
|
17
|
+
"homepage": "https://github.com/greenido/wacrawl-ui#readme",
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/greenido/wacrawl-ui/issues"
|
|
20
|
+
},
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=20"
|
|
23
|
+
},
|
|
24
|
+
"bin": {
|
|
25
|
+
"wacrawl-dashboard": "bin/wacrawl-dashboard.js"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"apps/api/dist",
|
|
29
|
+
"apps/web/dist",
|
|
30
|
+
"bin"
|
|
31
|
+
],
|
|
32
|
+
"workspaces": [
|
|
33
|
+
"apps/api",
|
|
34
|
+
"apps/web"
|
|
35
|
+
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"dev": "concurrently \"npm run dev -w @wacrawl/api\" \"npm run dev -w @wacrawl/web\"",
|
|
38
|
+
"build": "npm run build -w @wacrawl/api && npm run build -w @wacrawl/web",
|
|
39
|
+
"test": "npm run test -w @wacrawl/api",
|
|
40
|
+
"preview": "npm run preview -w @wacrawl/web",
|
|
41
|
+
"typecheck": "npm run typecheck -w @wacrawl/api && npm run typecheck -w @wacrawl/web",
|
|
42
|
+
"prepublishOnly": "npm run build"
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"better-sqlite3": "^12.4.6",
|
|
46
|
+
"cors": "^2.8.5",
|
|
47
|
+
"date-fns": "^4.1.0",
|
|
48
|
+
"dotenv": "^17.2.3",
|
|
49
|
+
"express": "^5.2.1",
|
|
50
|
+
"stopword": "^3.1.5"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"concurrently": "^9.2.1",
|
|
54
|
+
"typescript": "^5.9.3"
|
|
55
|
+
}
|
|
56
|
+
}
|