🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
finst commit
Bill Yangebf73c681faf
diff --git a/.gitignore b/.gitignorenew file mode 100644index 000000000..e92a57665--- /dev/null+++ b/.gitignore@@ -0,0 +1,44 @@+# Dependencies+node_modules/+.pnpm-store/++# Build outputs+dist/+build/+*.tsbuildinfo++# Environment variables+.env+.env.local+.env.*.local++# Logs+logs+*.log+npm-debug.log*+yarn-debug.log*+yarn-error.log*+pnpm-debug.log*++# IDE specific files+.idea/+.vscode/+*.swp+*.swo+.DS_Store++# Docker volumes+docker-volumes/+clickhouse-data/++# Testing+coverage/+.nyc_output/++# Temporary files+*.tmp+*.temp+.cache/++# Production+.env.production\ No newline at end of filediff --git a/docker-compose.yml b/docker-compose.ymlnew file mode 100644index 000000000..a6aecabc1--- /dev/null+++ b/docker-compose.yml@@ -0,0 +1,39 @@+version: '3.8'++services:+ clickhouse:+ image: clickhouse/clickhouse-server:latest+ ports:+ - "8123:8123" # HTTP interface+ - "9000:9000" # Native interface+ volumes:+ - clickhouse-data:/var/lib/clickhouse+ environment:+ - CLICKHOUSE_DB=analytics+ - CLICKHOUSE_USER=admin+ - CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1+ - CLICKHOUSE_PASSWORD=analytics_password++ backend:+ build:+ context: ./server+ # dockerfile: Dockerfile+ dockerfile: Dockerfile.dev++ ports:+ - "3001:3001"+ environment:+ - NODE_ENV=development+ - CLICKHOUSE_HOST=http://clickhouse:8123+ - CLICKHOUSE_PORT=8123+ - CLICKHOUSE_DB=analytics+ - CLICKHOUSE_USER=admin+ - CLICKHOUSE_PASSWORD=analytics_password+ depends_on:+ - clickhouse+ volumes:+ - ./server:/app+ - /app/node_modules++volumes:+ clickhouse-data:diff --git a/server/Dockerfile b/server/Dockerfilenew file mode 100644index 000000000..fd6670044--- /dev/null+++ b/server/Dockerfile@@ -0,0 +1,28 @@+FROM node:18-alpine++# Install pnpm+RUN npm install -g pnpm++WORKDIR /app++# Copy package files+COPY package.json pnpm-lock.yaml ./++# Install ALL dependencies (including dev) for building+RUN pnpm install --frozen-lockfile++# Copy source code and config files+COPY . .++# Build the application+RUN pnpm build++# Clean up dev dependencies after build+RUN pnpm prune --prod++EXPOSE 3001++# Use production environment+ENV NODE_ENV=production++CMD ["pnpm", "start"]\ No newline at end of filediff --git a/server/Dockerfile.dev b/server/Dockerfile.devnew file mode 100644index 000000000..87fa9413d--- /dev/null+++ b/server/Dockerfile.dev@@ -0,0 +1,16 @@+FROM node:18-alpine++# Install pnpm+RUN npm install -g pnpm++WORKDIR /app++# Copy package files+COPY package.json pnpm-lock.yaml ./++# Install dependencies including devDependencies+RUN pnpm install --frozen-lockfile++EXPOSE 3001++CMD ["pnpm", "dev"]\ No newline at end of filediff --git a/server/package.json b/server/package.jsonnew file mode 100644index 000000000..24074ab21--- /dev/null+++ b/server/package.json@@ -0,0 +1,22 @@+{+ "name": "analytics-backend",+ "version": "1.0.0",+ "description": "Self-hosted analytics backend using ClickHouse",+ "main": "dist/index.js",+ "scripts": {+ "dev": "ts-node-dev --respawn --transpile-only src/index.ts",+ "build": "tsc",+ "start": "node dist/index.js"+ },+ "dependencies": {+ "@clickhouse/client": "^0.2.7",+ "@fastify/cors": "^8.4.1",+ "fastify": "^4.24.3",+ "fastify-plugin": "^4.5.1"+ },+ "devDependencies": {+ "@types/node": "^20.10.0",+ "ts-node-dev": "^2.0.0",+ "typescript": "^5.7.3"+ }+}diff --git a/server/pnpm-lock.yaml b/server/pnpm-lock.yamlnew file mode 100644index 000000000..f057b946c--- /dev/null+++ b/server/pnpm-lock.yaml@@ -0,0 +1,931 @@+lockfileVersion: '9.0'++settings:+ autoInstallPeers: true+ excludeLinksFromLockfile: false++importers:++ .:+ dependencies:+ '@clickhouse/client':+ specifier: ^0.2.7+ version: 0.2.10+ '@fastify/cors':+ specifier: ^8.4.1+ version: 8.5.0+ fastify:+ specifier: ^4.24.3+ version: 4.29.0+ fastify-plugin:+ specifier: ^4.5.1+ version: 4.5.1+ devDependencies:+ '@types/node':+ specifier: ^20.10.0+ version: 20.17.14+ ts-node-dev:+ specifier: ^2.0.0+ version: 2.0.0(@types/[email protected])([email protected])+ typescript:+ specifier: ^5.7.3+ version: 5.7.3++packages:++ '@clickhouse/[email protected]':+ resolution: {integrity: sha512-BvTY0IXS96y9RUeNCpKL4HUzHmY80L0lDcGN0lmUD6zjOqYMn78+xyHYJ/AIAX7JQsc+/KwFt2soZutQTKxoGQ==}++ '@clickhouse/[email protected]':+ resolution: {integrity: sha512-ZwBgzjEAFN/ogS0ym5KHVbR7Hx/oYCX01qGp2baEyfN2HM73kf/7Vp3GvMHWRy+zUXISONEtFv7UTViOXnmFrg==}+ engines: {node: '>=16'}++ '@cspotcode/[email protected]':+ resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==}+ engines: {node: '>=12'}++ '@fastify/[email protected]':+ resolution: {integrity: sha512-LwdXQJjmMD+GwLOkP7TVC68qa+pSSogeWWmznRJ/coyTcfe9qA05AHFSe1eZFwK6q+xVRpChnvFUkf1iYaSZsQ==}++ '@fastify/[email protected]':+ resolution: {integrity: sha512-/oZ1QSb02XjP0IK1U0IXktEsw/dUBTxJOW7IpIeO8c/tNalw/KjoNSJv1Sf6eqoBPO+TDGkifq6ynFK3v68HFQ==}++ '@fastify/[email protected]':+ resolution: {integrity: sha512-wWSvph+29GR783IhmvdwWnN4bUxTD01Vm5Xad4i7i1VuAOItLvbPAb69sb0IQ2N57yprvhNIwAP5B6xfKTmjmQ==}++ '@fastify/[email protected]':+ resolution: {integrity: sha512-aZAXGYo6m22Fk1zZzEUKBvut/CIIQe/BapEORnxiD5Qr0kPHqqI69NtEMCme74h+at72sPhbkb4ZrLd1W3KRLA==}++ '@fastify/[email protected]':+ resolution: {integrity: sha512-fERDVz7topgNjtXsJTTW1JKLy0rhuLRcquYqNR9rF7OcVpCa2OVW49ZPDIhaRRCaUuvVxI+N416xUoF76HNSXA==}++ '@jridgewell/[email protected]':+ resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==}+ engines: {node: '>=6.0.0'}++ '@jridgewell/[email protected]':+ resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==}++ '@jridgewell/[email protected]':+ resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==}++ '@tsconfig/[email protected]':+ resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==}++ '@tsconfig/[email protected]':+ resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==}++ '@tsconfig/[email protected]':+ resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==}++ '@tsconfig/[email protected]':+ resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==}++ '@types/[email protected]':+ resolution: {integrity: sha512-w6qdYetNL5KRBiSClK/KWai+2IMEJuAj+EujKCumalFOwXtvOXaEan9AuwcRID2IcOIAWSIfR495hBtgKlx2zg==}++ '@types/[email protected]':+ resolution: {integrity: sha512-xevGOReSYGM7g/kUBZzPqCrR/KYAo+F0yiPc85WFTJa0MSLtyFTVTU6cJu/aV4mid7IffDIWqo69THF2o4JiEQ==}++ '@types/[email protected]':+ resolution: {integrity: sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ==}++ resolution: {integrity: sha512-2BjRTZxTPvheOvGbBslFSYOUkr+SjPtOnrLP33f+VIWLzezQpZcqVg7ja3L4dBXmzzgwT+a029jRx5PCi3JuiA==}++ resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==}+ engines: {node: '>=0.4.0'}++ resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==}+ engines: {node: '>=0.4.0'}+ hasBin: true++ resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==}+ peerDependencies:+ ajv: ^8.0.0+ peerDependenciesMeta:+ ajv:+ optional: true++ resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==}+ peerDependencies:+ ajv: ^8.0.0+ peerDependenciesMeta:+ ajv:+ optional: true++ resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==}++ resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==}+ engines: {node: '>= 8'}++ resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==}++ resolution: {integrity: sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==}+ engines: {node: '>=8.0.0'}++ resolution: {integrity: sha512-CDSwaxINFy59iNwhYnkvALBwZiTydGkOecZyPkqBpABYR1KqGEsET0VOOYDwtleZSUIdeY36DC2bSZ24CO1igA==}++ resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}++ resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==}+ engines: {node: '>=8'}++ resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==}++ resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==}+ engines: {node: '>=8'}++ resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==}++ resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==}+ engines: {node: '>= 8.10.0'}++ resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}++ resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==}+ engines: {node: '>= 0.6'}++ resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==}++ resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==}+ engines: {node: '>=0.3.1'}++ resolution: {integrity: sha512-ssuANeD+z97meYOqd50e04Ze5qp4bPqo8cCkI4TRjZkzAUgIDTrXV1R8QCdINpiI+hw14+rYazvTRdQrz0/rFQ==}++ resolution: {integrity: sha512-fBHHqSTFLVnR61C+gltJuE5GkVQMV0S2nqUO8TJ+5Z3qAKG8vAx4FKai1s5jq/inV1+sREynIWSuQ6HgoSXpDQ==}++ resolution: {integrity: sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg==}++ resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}++ resolution: {integrity: sha512-KAdnLvy1yu/XrRtP+LJnxbBGrhN+xXu+gt3EUvZhYGKCr3lFHq/7UFJHHFgmJKoqlh6B40bZLEv7w46B0mqn1g==}++ resolution: {integrity: sha512-g6KuKWmFXc0fID8WWH0jit4g0AGBoJhCkJMb1RmbsSEUNvQ+ZC8D6CUZ+GtF8nMzSPXnhiePyyqqipzNNEnHjg==}++ resolution: {integrity: sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A==}+ engines: {node: '>=6'}++ resolution: {integrity: sha512-ypuAmmMKInk5q7XcepxlnUWDLWv4GFtaJqAzWKqn62IpQ3pejtr5dTVbt3vwqVaMKmkNR55sTT+CqUKIaT21BA==}++ resolution: {integrity: sha512-5JnBCWpFlMo0a3ciDy/JckMzzv1U9coZrIhedq+HXxxUfDTAiS0LA8OKVao4G9BxmCVck/jtA5r3KAtRWEyD8Q==}++ resolution: {integrity: sha512-stRHYGeuqpEZTL1Ef0Ovr2ltazUT9g844X5z/zEBFLG8RYlpDiOCIG+ATvYEp+/zmc7sN29mcIMp8gvYplYPIQ==}++ resolution: {integrity: sha512-MaaUHUGcCgC8fXQDsDtioaCcag1fmPJ9j64vAKunqZF4aSub040ZGi/ag8NGE2714yREPOKZuHCfpPzuUD3UQQ==}++ resolution: {integrity: sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw==}++ resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==}+ engines: {node: '>=8'}++ resolution: {integrity: sha512-Dobi7gcTEq8yszimcfp/R7+owiT4WncAJ7VTTgFH1jYJ5GaG1FbhjwDG820hptN0QDFvzVY3RfCzdInvGPGzjA==}+ engines: {node: '>=14'}++ resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==}+ engines: {node: '>= 0.6'}++ resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==}++ resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==}+ engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}+ os: [darwin]++ resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==}++ resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==}+ engines: {node: '>= 6'}++ resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}+ deprecated: Glob versions prior to v9 are no longer supported++ resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}+ engines: {node: '>= 0.4'}++ resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==}+ deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.++ resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}++ resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==}+ engines: {node: '>= 0.10'}++ resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==}+ engines: {node: '>=8'}++ resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==}+ engines: {node: '>= 0.4'}++ resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==}+ engines: {node: '>=0.10.0'}++ resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==}+ engines: {node: '>=0.10.0'}++ resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}+ engines: {node: '>=0.12.0'}++ resolution: {integrity: sha512-EJAj1pgHc1hxF6vo2Z3s69fMjO1INq6eGHXZ8Z6wCQeldCuwxGK9Sxf4/cScGn3FZubCVUehfWtcDM/PLteCQw==}++ resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==}++ resolution: {integrity: sha512-aORPWntbpH5esaYpGOOmri0OHDOe3wC5M2MQxZ9dvMLZm6DnaAn0kJlcbU9hwsQgLzmZyReKwFwwPkR+nHu5kA==}++ resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==}++ resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==}++ resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==}++ resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==}+ engines: {node: '>=10'}+ hasBin: true++ resolution: {integrity: sha512-A/0v5Z59y63US00cRSLiloEIw3t5G+MiKz4BhX21FI+YBJXBOGW0ohFxTxO08dsOYlzxo87T7vGfZKYp2bcAWA==}++ resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==}+ engines: {node: '>=0.10.0'}++ resolution: {integrity: sha512-42CPE9AhahZRsMNslczq0ctAEtqk8Eka26QofnqC346BZdHDySk3LWka23LI7ULIw11NmltpiLagIq8gBozxTw==}++ resolution: {integrity: sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==}+ engines: {node: '>=14.0.0'}++ resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==}++ resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==}+ engines: {node: '>=0.10.0'}++ resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}++ resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==}+ engines: {node: '>=8.6'}++ resolution: {integrity: sha512-F63x5tizV6WCh4R6RHyi2Ml+M70DNRXt/+HANowMflpgGFMAym/VKm6G7ZOQRjqN7XbGxK1Lg9t6ZrtzOaivMw==}++ resolution: {integrity: sha512-e906FRY0+tV27iq4juKzSYPbUj2do2X2JX4EzSca1631EB2QJQUqGbDuERal7LCtOpxl6x3+nvo9NPZcmjkiFA==}++ resolution: {integrity: sha512-i85pKRCt4qMjZ1+L7sy2Ag4t1atFcdbEt76+7iRJn1g2BvsnRMGu9p8pivl9fs63M2kF/A0OacFZhTub+m/qMg==}+ hasBin: true++ resolution: {integrity: sha512-mqn0kFRl0EoqhnL0GQ0veqFHyIN1yig9RHh/InzORTUiZHFRAur+aMtRkELNwGs9aNwKS6tg/An4NYBPGwvtzQ==}++ resolution: {integrity: sha512-3c2LzQ3rY9d0hc1emcsHhfT9Jwz0cChib/QN89oME2R451w5fy3f0afAhERFZAwrbDU43wk12d0ORBpDVME50Q==}++ resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==}+ engines: {node: '>= 0.10'}++ resolution: {integrity: sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==}++ resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==}+ engines: {node: '>=8.10.0'}++ resolution: {integrity: sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==}+ engines: {node: '>= 12.13.0'}++ resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==}+ engines: {node: '>=0.10.0'}++ resolution: {integrity: sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==}+ engines: {node: '>= 0.4'}+ hasBin: true++ resolution: {integrity: sha512-0f4Memo5QP7WQyUEAYUO3esD/XjOc3Zjjg5CPsAq1p8sIu0XPeMbHJemKA0BO7tV0X7+A0FoEpbmHXWxPyD3wQ==}+ engines: {node: '>=10'}++ resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==}+ engines: {iojs: '>=1.0.0', node: '>=0.10.0'}++ resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==}++ resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==}+ deprecated: Rimraf versions prior to v4 are no longer supported+ hasBin: true++ resolution: {integrity: sha512-RAAZAGbap2kBfbVhvmnTFv73NWLMvDGOITFYTZBAaY8eR+Ir4ef7Up/e7amo+y1+AH+3PtLkrt9mvcTsG9LXug==}++ resolution: {integrity: sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==}+ engines: {node: '>=10'}++ resolution: {integrity: sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==}++ resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==}+ engines: {node: '>=10'}+ hasBin: true++ resolution: {integrity: sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==}++ resolution: {integrity: sha512-INb7TM37/mAcsGmc9hyyI6+QR3rR1zVRu36B0NeGXKnOOLiZOfER5SA+N7X7k3yUYRzLWafduTDvJAfDswwEww==}++ resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==}++ resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}+ engines: {node: '>=0.10.0'}++ resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==}+ engines: {node: '>= 10.x'}++ resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==}+ engines: {node: '>=4'}++ resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==}+ engines: {node: '>=0.10.0'}++ resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}+ engines: {node: '>= 0.4'}++ resolution: {integrity: sha512-OqyPZ9u96VohAyMfJykzmivOrY2wfMSf3C5TtFJVgN+Hm6aj+voFhlK+kZEIv2FBh1X6Xp3DlnCOfEQ3B2J86A==}++ resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}+ engines: {node: '>=8.0'}++ resolution: {integrity: sha512-/m8M+2BJUpoJdgAHoG+baCwBT+tf2VraSfkBgl0Y00qIWt41DJ8R5B8nsEw0I58YwF5IZH6z24/2TobDKnqSWw==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==}+ hasBin: true++ resolution: {integrity: sha512-ywMrhCfH6M75yftYvrvNarLEY+SUXtUvU8/0Z6llrHQVBx12GiFk5sStF8UdfE/yfzk9IAq7O5EEbTQsxlBI8w==}+ engines: {node: '>=0.8.0'}+ hasBin: true+ peerDependencies:+ node-notifier: '*'+ typescript: '*'+ peerDependenciesMeta:+ node-notifier:+ optional: true++ resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==}+ hasBin: true+ peerDependencies:+ '@swc/core': '>=1.2.50'+ '@swc/wasm': '>=1.2.50'+ '@types/node': '*'+ typescript: '>=2.7'+ peerDependenciesMeta:+ '@swc/core':+ optional: true+ '@swc/wasm':+ optional: true++ resolution: {integrity: sha512-vZXmzPrL+EmC4T/4rVlT2jNVMWCi/O4DIiSj3UHg1OE5kCKbk4mfrXc6dZksLgRM/TZlKnousKH9bbTazUWRRw==}++ resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==}+ engines: {node: '>=14.17'}+ hasBin: true++ resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==}++ resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==}++ resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==}++ resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==}+ engines: {node: '>=0.4'}++ resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==}+ engines: {node: '>=6'}++snapshots:++ '@clickhouse/[email protected]': {}++ '@clickhouse/[email protected]':+ dependencies:+ '@clickhouse/client-common': 0.2.10++ '@cspotcode/[email protected]':+ dependencies:+ '@jridgewell/trace-mapping': 0.3.9++ '@fastify/[email protected]':+ dependencies:+ ajv: 8.17.1+ ajv-formats: 2.1.1([email protected])+ fast-uri: 2.4.0++ '@fastify/[email protected]':+ dependencies:+ fastify-plugin: 4.5.1+ mnemonist: 0.39.6++ '@fastify/[email protected]': {}++ '@fastify/[email protected]':+ dependencies:+ fast-json-stringify: 5.16.1++ '@fastify/[email protected]':+ dependencies:+ fast-deep-equal: 3.1.3++ '@jridgewell/[email protected]': {}++ '@jridgewell/[email protected]': {}++ '@jridgewell/[email protected]':+ dependencies:+ '@jridgewell/resolve-uri': 3.1.2+ '@jridgewell/sourcemap-codec': 1.5.0++ '@tsconfig/[email protected]': {}++ '@tsconfig/[email protected]': {}++ '@tsconfig/[email protected]': {}++ '@tsconfig/[email protected]': {}++ '@types/[email protected]':+ dependencies:+ undici-types: 6.19.8++ '@types/[email protected]': {}++ '@types/[email protected]': {}++ [email protected]: {}++ dependencies:+ acorn: 8.14.0++ [email protected]: {}++ optionalDependencies:+ ajv: 8.17.1++ optionalDependencies:+ ajv: 8.17.1++ dependencies:+ fast-deep-equal: 3.1.3+ fast-uri: 3.0.5+ json-schema-traverse: 1.0.0+ require-from-string: 2.0.2++ dependencies:+ normalize-path: 3.0.0+ picomatch: 2.3.1++ [email protected]: {}++ [email protected]: {}++ dependencies:+ '@fastify/error': 3.4.1+ fastq: 1.18.0++ [email protected]: {}++ [email protected]: {}++ dependencies:+ balanced-match: 1.0.2+ concat-map: 0.0.1++ dependencies:+ fill-range: 7.1.1++ [email protected]: {}++ dependencies:+ anymatch: 3.1.3+ braces: 3.0.3+ glob-parent: 5.1.2+ is-binary-path: 2.1.0+ is-glob: 4.0.3+ normalize-path: 3.0.0+ readdirp: 3.6.0+ optionalDependencies:+ fsevents: 2.3.3++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ dependencies:+ xtend: 4.0.2++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ dependencies:+ '@fastify/merge-json-schemas': 0.1.1+ ajv: 8.17.1+ ajv-formats: 3.0.1([email protected])+ fast-deep-equal: 3.1.3+ fast-uri: 2.4.0+ json-schema-ref-resolver: 1.0.1+ rfdc: 1.4.1++ dependencies:+ fast-decode-uri-component: 1.0.1++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ dependencies:+ '@fastify/ajv-compiler': 3.6.0+ '@fastify/error': 3.4.1+ '@fastify/fast-json-stringify-compiler': 4.3.0+ abstract-logging: 2.0.1+ avvio: 8.4.0+ fast-content-type-parse: 1.1.0+ fast-json-stringify: 5.16.1+ find-my-way: 8.2.2+ light-my-request: 5.14.0+ pino: 9.6.0+ process-warning: 3.0.0+ proxy-addr: 2.0.7+ rfdc: 1.4.1+ secure-json-parse: 2.7.0+ semver: 7.6.3+ toad-cache: 3.7.0++ dependencies:+ reusify: 1.0.4++ dependencies:+ to-regex-range: 5.0.1++ dependencies:+ fast-deep-equal: 3.1.3+ fast-querystring: 1.1.2+ safe-regex2: 3.1.0++ [email protected]: {}++ [email protected]: {}++ optional: true++ [email protected]: {}++ dependencies:+ is-glob: 4.0.3++ dependencies:+ fs.realpath: 1.0.0+ inflight: 1.0.6+ inherits: 2.0.4+ minimatch: 3.1.2+ once: 1.4.0+ path-is-absolute: 1.0.1++ dependencies:+ function-bind: 1.1.2++ dependencies:+ once: 1.4.0+ wrappy: 1.0.2++ [email protected]: {}++ [email protected]: {}++ dependencies:+ binary-extensions: 2.3.0++ dependencies:+ hasown: 2.0.2++ [email protected]: {}++ dependencies:+ is-extglob: 2.1.1++ [email protected]: {}++ dependencies:+ fast-deep-equal: 3.1.3++ [email protected]: {}++ dependencies:+ cookie: 0.7.2+ process-warning: 3.0.0+ set-cookie-parser: 2.7.1++ [email protected]: {}++ dependencies:+ brace-expansion: 1.1.11++ [email protected]: {}++ [email protected]: {}++ dependencies:+ obliterator: 2.0.5++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ dependencies:+ wrappy: 1.0.2++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ dependencies:+ split2: 4.2.0++ [email protected]: {}++ dependencies:+ atomic-sleep: 1.0.0+ fast-redact: 3.5.0+ on-exit-leak-free: 2.1.2+ pino-abstract-transport: 2.0.0+ pino-std-serializers: 7.0.0+ process-warning: 4.0.1+ quick-format-unescaped: 4.0.4+ real-require: 0.2.0+ safe-stable-stringify: 2.5.0+ sonic-boom: 4.2.0+ thread-stream: 3.1.0++ [email protected]: {}++ [email protected]: {}++ dependencies:+ forwarded: 0.2.0+ ipaddr.js: 1.9.1++ [email protected]: {}++ dependencies:+ picomatch: 2.3.1++ [email protected]: {}++ [email protected]: {}++ dependencies:+ is-core-module: 2.16.1+ path-parse: 1.0.7+ supports-preserve-symlinks-flag: 1.0.0++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ dependencies:+ glob: 7.2.3++ dependencies:+ ret: 0.4.3++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ dependencies:+ atomic-sleep: 1.0.0++ dependencies:+ buffer-from: 1.1.2+ source-map: 0.6.1++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ dependencies:+ real-require: 0.2.0++ dependencies:+ is-number: 7.0.0++ [email protected]: {}++ [email protected]: {}++ dependencies:+ chokidar: 3.6.0+ dynamic-dedupe: 0.3.0+ minimist: 1.2.8+ mkdirp: 1.0.4+ resolve: 1.22.10+ rimraf: 2.7.1+ source-map-support: 0.5.21+ tree-kill: 1.2.2+ ts-node: 10.9.2(@types/[email protected])([email protected])+ tsconfig: 7.0.0+ typescript: 5.7.3+ transitivePeerDependencies:+ - '@swc/core'+ - '@swc/wasm'+ - '@types/node'++ dependencies:+ '@cspotcode/source-map-support': 0.8.1+ '@tsconfig/node10': 1.0.11+ '@tsconfig/node12': 1.0.11+ '@tsconfig/node14': 1.0.3+ '@tsconfig/node16': 1.0.4+ '@types/node': 20.17.14+ acorn: 8.14.0+ acorn-walk: 8.3.4+ arg: 4.1.3+ create-require: 1.1.1+ diff: 4.0.2+ make-error: 1.3.6+ typescript: 5.7.3+ v8-compile-cache-lib: 3.0.1+ yn: 3.1.1++ dependencies:+ '@types/strip-bom': 3.0.0+ '@types/strip-json-comments': 0.0.30+ strip-bom: 3.0.0+ strip-json-comments: 2.0.1++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}diff --git a/server/src/db/clickhouse.ts b/server/src/db/clickhouse.tsnew file mode 100644index 000000000..33d0fd613--- /dev/null+++ b/server/src/db/clickhouse.ts@@ -0,0 +1,50 @@+import { createClient } from "@clickhouse/client";++const client = createClient({+ host: process.env.CLICKHOUSE_HOST || "http://localhost:8123",+ username: process.env.CLICKHOUSE_USER || "admin",+ password: process.env.CLICKHOUSE_PASSWORD || "analytics_password",+ database: process.env.CLICKHOUSE_DB || "analytics",+});++export const initializeDatabase = async () => {+ // Create pageviews table+ await client.exec({+ query: `+ CREATE TABLE IF NOT EXISTS pageviews (+ timestamp DateTime,+ session_id String,+ page_url String,+ referrer String,+ user_agent String,+ ip_address String,+ country String,+ device_type String,+ browser String,+ os String,+ duration UInt32+ )+ ENGINE = MergeTree()+ PARTITION BY toYYYYMM(timestamp)+ ORDER BY (timestamp, session_id)+ `,+ });++ // Create events table+ await client.exec({+ query: `+ CREATE TABLE IF NOT EXISTS events (+ timestamp DateTime,+ session_id String,+ event_name String,+ event_data String,+ page_url String+ )+ ENGINE = MergeTree()+ PARTITION BY toYYYYMM(timestamp)+ ORDER BY (timestamp, session_id)+ `,+ });+};++export default client;diff --git a/server/src/index.ts b/server/src/index.tsnew file mode 100644index 000000000..4402a7f90--- /dev/null+++ b/server/src/index.ts@@ -0,0 +1,60 @@+import Fastify, { FastifyRequest, FastifyReply } from "fastify";+import cors from "@fastify/cors";+import { initializeDatabase } from "./db/clickhouse";++const fastify = Fastify({+ logger: true,+});++// Register CORS+fastify.register(cors, {+ origin: true, // In production, you should specify your frontend domain+});++interface TrackingPayload {+ url: string;+ timestamp: string;+ sessionId: string;+ [key: string]: any;+}++// Health check endpoint+fastify.get("/health", async () => {+ return { status: "ok" };+});++// Track pageview endpoint+fastify.post<{ Body: TrackingPayload }>(+ "/track/pageview",+ async (request: FastifyRequest, reply: FastifyReply) => {+ const payload = request.body;+ console.info(payload);+ // TODO: Implement pageview tracking logic+ return { success: true };+ }+);++// Track event endpoint+fastify.post<{ Body: TrackingPayload }>(+ "/track/event",+ async (request: FastifyRequest, reply: FastifyReply) => {+ const payload = request.body;+ // TODO: Implement event tracking logic+ return { success: true };+ }+);++const start = async () => {+ try {+ // Initialize the database+ await initializeDatabase();++ // Start the server+ await fastify.listen({ port: 3001, host: "0.0.0.0" });+ } catch (err) {+ fastify.log.error(err);+ process.exit(1);+ }+};++start();diff --git a/server/tsconfig.json b/server/tsconfig.jsonnew file mode 100644index 000000000..89440d860--- /dev/null+++ b/server/tsconfig.json@@ -0,0 +1,23 @@+{+ "compilerOptions": {+ "target": "ES2020",+ "module": "commonjs",+ "lib": [+ "ES2020"+ ],+ "strict": true,+ "esModuleInterop": true,+ "skipLibCheck": true,+ "forceConsistentCasingInFileNames": true,+ "outDir": "dist",+ "rootDir": "src",+ "moduleResolution": "node",+ "resolveJsonModule": true+ },+ "include": [+ "src/**/*"+ ],+ "exclude": [+ "node_modules"+ ]+}\ No newline at end of file