Files
caddy-proxy-manager/package.json
fuomag9 e1c97038d4 Migrate analytics from SQLite to ClickHouse
SQLite was too slow for analytical aggregations on traffic_events and
waf_events (millions of rows, GROUP BY, COUNT DISTINCT). ClickHouse is
a columnar OLAP database purpose-built for this workload.

- Add ClickHouse container to Docker Compose with health check
- Create src/lib/clickhouse/client.ts with singleton client, table DDL,
  insert helpers, and all analytics query functions
- Update log-parser.ts and waf-log-parser.ts to write to ClickHouse
- Remove purgeOldEntries — ClickHouse TTL handles 90-day retention
- Rewrite analytics-db.ts and waf-events.ts to query ClickHouse
- Remove trafficEvents/wafEvents from SQLite schema, add migration
- CLICKHOUSE_PASSWORD is required (no hardcoded default)
- Update .env.example, README, and test infrastructure

API response shapes are unchanged — no frontend modifications needed.
Parse state (file offsets) remains in SQLite.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 00:05:38 +02:00

91 lines
3.0 KiB
JSON

{
"name": "caddy-proxy-manager",
"version": "1.0.0",
"description": "Caddy Proxy Manager - web UI for managing Caddy reverse proxies with OAuth2 authentication.",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "eslint .",
"typecheck": "tsc --noEmit",
"test:all": "./scripts/test-all.sh",
"db:generate": "drizzle-kit generate",
"db:migrate": "drizzle-kit migrate",
"test": "vitest run --config tests/vitest.config.ts",
"test:watch": "vitest --config tests/vitest.config.ts",
"test:ui": "vitest --ui --config tests/vitest.config.ts",
"test:e2e": "playwright test --config tests/playwright.config.ts",
"test:e2e:ui": "playwright test --ui --config tests/playwright.config.ts",
"test:e2e:headed": "playwright test --headed --config tests/playwright.config.ts"
},
"dependencies": {
"@clickhouse/client": "^1.18.2",
"@radix-ui/react-accordion": "^1.2.12",
"@radix-ui/react-avatar": "^1.1.11",
"@radix-ui/react-checkbox": "^1.3.3",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-dropdown-menu": "^2.1.16",
"@radix-ui/react-label": "^2.1.8",
"@radix-ui/react-popover": "^1.1.15",
"@radix-ui/react-scroll-area": "^1.2.10",
"@radix-ui/react-select": "^2.2.6",
"@radix-ui/react-separator": "^1.1.8",
"@radix-ui/react-slot": "^1.2.4",
"@radix-ui/react-switch": "^1.2.6",
"@radix-ui/react-tabs": "^1.1.13",
"@radix-ui/react-tooltip": "^1.2.8",
"@tailwindcss/postcss": "^4.2.2",
"apexcharts": "^5.10.4",
"autoprefixer": "^10.4.27",
"bcryptjs": "^3.0.3",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"d3-geo": "^3.1.1",
"date-fns": "^4.1.0",
"dayjs": "^1.11.20",
"drizzle-orm": "^0.45.2",
"lucide-react": "^1.7.0",
"maplibre-gl": "^5.21.1",
"maxmind": "^5.0.6",
"next": "^16.2.2",
"next-auth": "5.0.0-beta.30",
"next-themes": "^0.4.6",
"node-forge": "^1.4.0",
"postcss": "^8.5.8",
"react": "^19.2.4",
"react-apexcharts": "^2.1.0",
"react-day-picker": "^9.14.0",
"react-dom": "^19.2.4",
"react-map-gl": "^8.1.0",
"sonner": "^2.0.7",
"tailwind-merge": "^3.5.0",
"tailwindcss": "^4.2.2",
"topojson-client": "^3.1.0"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@next/eslint-plugin-next": "^16.2.2",
"@playwright/test": "^1.59.1",
"@types/better-sqlite3": "^7.6.13",
"@types/bun": "^1.3.11",
"@types/d3-geo": "^3.1.0",
"@types/node": "^25.5.1",
"@types/node-forge": "^1.3.14",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@types/topojson-client": "^3.1.5",
"@vitest/ui": "^4.1.2",
"better-sqlite3": "^12.8.0",
"drizzle-kit": "^0.31.10",
"eslint": "^10.1.0",
"shadcn": "^4.1.2",
"typescript": "^6.0.2",
"typescript-eslint": "^8.58.0",
"vite-tsconfig-paths": "^6.1.1",
"vitest": "^4.1.2",
"world-atlas": "^2.0.2"
}
}