🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
Update dependencies and enhance live session location fetching
Bill Yang15fd0dad08ea
diff --git a/CLAUDE.md b/CLAUDE.mdnew file mode 100644index 000000000..dc308cb77--- /dev/null+++ b/CLAUDE.md@@ -0,0 +1,25 @@+# FrogStats Code Guidelines++## Commands+### Client (Next.js)+- Build: `npm run build`+- Dev: `npm run dev` (port 3002 with turbopack)+- Lint: `npm run lint`+- Start: `npm run start` (port 3002)++### Server+- Build: `npm run build`+- Dev: `npm run dev` (builds and runs)+- DB: `npm run db:generate|migrate|push|pull|check|drop`++## Code Style+- **TypeScript**: Strict typing, interfaces for API/props+- **React**: Functional components, Tanstack Query, Zustand+- **Formatting**: Arrow functions, async/await, named exports+- **Naming**: camelCase for functions/variables, PascalCase for components+- **Structure**: Client (Next.js + Tailwind + Shadcn), Server (Fastify + Drizzle + ClickHouse)+- **Error Handling**: Proper checking in API endpoints, appropriate messages in UI+- **Documentation**: JSDoc for utilities, descriptive function names+- **Theme**: Dark mode by default++FrogStats is a self-hostable open source Google Analytics alternative.\ No newline at end of filediff --git a/client/package-lock.json b/client/package-lock.jsonindex b85fcdacb..c61bdd945 100644--- a/client/package-lock.json+++ b/client/package-lock.json@@ -28,6 +28,8 @@"@radix-ui/react-tabs": "^1.1.3","@radix-ui/react-tooltip": "^1.1.8","@radix-ui/themes": "^3.2.0",+ "@react-three/drei": "^10.0.6",+ "@react-three/fiber": "^9.1.2","@tanstack/react-query": "^5.64.2","@tanstack/react-query-devtools": "^5.64.2","@tanstack/react-table": "^8.21.2",@@ -40,6 +42,7 @@"cmdk": "^1.0.0","countries-list": "^3.1.1","country-flag-icons": "^1.5.14",+ "d3-geo": "^3.1.1","date-fns": "^4.1.0","deps": "^1.0.0","geojson": "^0.5.0",@@ -61,6 +64,7 @@"spinners-react": "^1.0.10","tailwind-merge": "^2.6.0","tailwindcss-animate": "^1.0.7",+ "three": "^0.175.0","zustand": "^5.0.3"},"devDependencies": {@@ -1585,6 +1589,22 @@"resolved": "https://registry.npmjs.org/@levischuck/tiny-cbor/-/tiny-cbor-0.2.11.tgz","integrity": "sha512-llBRm4dT4Z89aRsm6u2oEZ8tfwL/2l6BwpZ7JcyieouniDECM5AqNgr/y08zalEIvW3RSK4upYyybDcmjXqAow=="},+ "node_modules/@mediapipe/tasks-vision": {+ "version": "0.10.17",+ "resolved": "https://registry.npmjs.org/@mediapipe/tasks-vision/-/tasks-vision-0.10.17.tgz",+ "integrity": "sha512-CZWV/q6TTe8ta61cZXjfnnHsfWIdFhms03M9T7Cnd5y2mdpylJM0rF1qRq+wsQVRMLz1OYPVEBU9ph2Bx8cxrg=="+ },+ "node_modules/@monogrid/gainmap-js": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/@monogrid/gainmap-js/-/gainmap-js-3.1.0.tgz",+ "integrity": "sha512-Obb0/gEd/HReTlg8ttaYk+0m62gQJmCblMOjHSMHRrBP2zdfKMHLCRbh/6ex9fSUJMKdjjIEiohwkbGD3wj2Nw==",+ "dependencies": {+ "promise-worker-transferable": "^1.0.4"+ },+ "peerDependencies": {+ "three": ">= 0.159.0"+ }+ },"node_modules/@next/env": {"version": "15.1.6","resolved": "https://registry.npmjs.org/@next/env/-/env-15.1.6.tgz",@@ -3476,6 +3496,94 @@"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"}},+ "node_modules/@react-three/drei": {+ "version": "10.0.6",+ "resolved": "https://registry.npmjs.org/@react-three/drei/-/drei-10.0.6.tgz",+ "integrity": "sha512-QtiAv/a1BaP+ZYfp8BphV8BMSO0O1BNhIPye3Zqm5iDqgX6JeiknPR6f2UmzUdBfPLwjZEaqjfULgJFvTUWgkg==",+ "dependencies": {+ "@babel/runtime": "^7.26.0",+ "@mediapipe/tasks-vision": "0.10.17",+ "@monogrid/gainmap-js": "^3.0.6",+ "@use-gesture/react": "^10.3.1",+ "camera-controls": "^2.9.0",+ "cross-env": "^7.0.3",+ "detect-gpu": "^5.0.56",+ "glsl-noise": "^0.0.0",+ "hls.js": "^1.5.17",+ "maath": "^0.10.8",+ "meshline": "^3.3.1",+ "stats-gl": "^2.2.8",+ "stats.js": "^0.17.0",+ "suspend-react": "^0.1.3",+ "three-mesh-bvh": "^0.8.3",+ "three-stdlib": "^2.35.6",+ "troika-three-text": "^0.52.0",+ "tunnel-rat": "^0.1.2",+ "use-sync-external-store": "^1.4.0",+ "utility-types": "^3.11.0",+ "zustand": "^5.0.1"+ },+ "peerDependencies": {+ "@react-three/fiber": "^9.0.0",+ "react": "^19",+ "react-dom": "^19",+ "three": ">=0.159"+ },+ "peerDependenciesMeta": {+ "react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@react-three/fiber": {+ "version": "9.1.2",+ "resolved": "https://registry.npmjs.org/@react-three/fiber/-/fiber-9.1.2.tgz",+ "integrity": "sha512-k8FR9yVHV9kIF3iuOD0ds5hVymXYXfgdKklqziBVod9ZEJ8uk05Zjw29J/omU3IKeUfLNAIHfxneN3TUYM4I2w==",+ "dependencies": {+ "@babel/runtime": "^7.17.8",+ "@types/react-reconciler": "^0.28.9",+ "@types/webxr": "*",+ "base64-js": "^1.5.1",+ "buffer": "^6.0.3",+ "its-fine": "^2.0.0",+ "react-reconciler": "^0.31.0",+ "react-use-measure": "^2.1.7",+ "scheduler": "^0.25.0",+ "suspend-react": "^0.1.3",+ "use-sync-external-store": "^1.4.0",+ "zustand": "^5.0.3"+ },+ "peerDependencies": {+ "expo": ">=43.0",+ "expo-asset": ">=8.4",+ "expo-file-system": ">=11.0",+ "expo-gl": ">=11.0",+ "react": "^19.0.0",+ "react-dom": "^19.0.0",+ "react-native": ">=0.78",+ "three": ">=0.156"+ },+ "peerDependenciesMeta": {+ "expo": {+ "optional": true+ },+ "expo-asset": {+ "optional": true+ },+ "expo-file-system": {+ "optional": true+ },+ "expo-gl": {+ "optional": true+ },+ "react-dom": {+ "optional": true+ },+ "react-native": {+ "optional": true+ }+ }+ },"node_modules/@simplewebauthn/browser": {"version": "13.1.0","resolved": "https://registry.npmjs.org/@simplewebauthn/browser/-/browser-13.1.0.tgz",@@ -3591,6 +3699,11 @@"url": "https://github.com/sponsors/tannerlinsley"}},+ "node_modules/@tweenjs/tween.js": {+ "version": "23.1.3",+ "resolved": "https://registry.npmjs.org/@tweenjs/tween.js/-/tween.js-23.1.3.tgz",+ "integrity": "sha512-vJmvvwFxYuGnF2axRtPYocag6Clbb5YS7kLL+SO/TeVFzHqDIWrNKYtcsPMibjDx9O+bu+psAy9NKfWklassUA=="+ },"node_modules/@types/country-flag-icons": {"version": "1.2.2","resolved": "https://registry.npmjs.org/@types/country-flag-icons/-/country-flag-icons-1.2.2.tgz",@@ -3647,6 +3760,11 @@"resolved": "https://registry.npmjs.org/@types/d3-time-format/-/d3-time-format-2.3.4.tgz","integrity": "sha512-xdDXbpVO74EvadI3UDxjxTdR6QIxm1FKzEA/+F8tL4GWWUg/hgvBqf6chql64U5A9ZUGWo7pEu4eNlyLwbKdhg=="},+ "node_modules/@types/draco3d": {+ "version": "1.4.10",+ "resolved": "https://registry.npmjs.org/@types/draco3d/-/draco3d-1.4.10.tgz",+ "integrity": "sha512-AX22jp8Y7wwaBgAixaSvkoG4M/+PlAcm3Qs4OW8yT9DM4xUpWKeFhLueTAyZF39pviAdcDdeJoACapiAceqNcw=="+ },"node_modules/@types/geojson": {"version": "7946.0.16","resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz",@@ -3701,6 +3819,11 @@"resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz","integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA=="},+ "node_modules/@types/offscreencanvas": {+ "version": "2019.7.3",+ "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.7.3.tgz",+ "integrity": "sha512-ieXiYmgSRXUDeOntE1InxjWyvEelZGP63M+cGuquuRLuIKKT1osnkXjxev9B7d1nXSug5vpunx+gNlbVxMlC9A=="+ },"node_modules/@types/parse-json": {"version": "4.0.2","resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz",@@ -3729,6 +3852,14 @@"@types/react": "^19.0.0"}},+ "node_modules/@types/react-reconciler": {+ "version": "0.28.9",+ "resolved": "https://registry.npmjs.org/@types/react-reconciler/-/react-reconciler-0.28.9.tgz",+ "integrity": "sha512-HHM3nxyUZ3zAylX8ZEyrDNd2XZOnQ0D5XfunJF5FLQnZbHHYq4UWvW1QfelQNXv1ICNkwYhfxjwfnqivYB6bFg==",+ "peerDependencies": {+ "@types/react": "*"+ }+ },"node_modules/@types/react-transition-group": {"version": "4.4.12","resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.12.tgz",@@ -3737,6 +3868,29 @@"@types/react": "*"}},+ "node_modules/@types/stats.js": {+ "version": "0.17.3",+ "resolved": "https://registry.npmjs.org/@types/stats.js/-/stats.js-0.17.3.tgz",+ "integrity": "sha512-pXNfAD3KHOdif9EQXZ9deK82HVNaXP5ZIF5RP2QG6OQFNTaY2YIetfrE9t528vEreGQvEPRDDc8muaoYeK0SxQ=="+ },+ "node_modules/@types/three": {+ "version": "0.175.0",+ "resolved": "https://registry.npmjs.org/@types/three/-/three-0.175.0.tgz",+ "integrity": "sha512-ldMSBgtZOZ3g9kJ3kOZSEtZIEITmJOzu8eKVpkhf036GuNkM4mt0NXecrjCn5tMm1OblOF7dZehlaDypBfNokw==",+ "dependencies": {+ "@tweenjs/tween.js": "~23.1.3",+ "@types/stats.js": "*",+ "@types/webxr": "*",+ "@webgpu/types": "*",+ "fflate": "~0.8.2",+ "meshoptimizer": "~0.18.1"+ }+ },+ "node_modules/@types/webxr": {+ "version": "0.5.21",+ "resolved": "https://registry.npmjs.org/@types/webxr/-/webxr-0.5.21.tgz",+ "integrity": "sha512-geZIAtLzjGmgY2JUi6VxXdCrTb99A7yP49lxLr2Nm/uIK0PkkxcEi4OGhoGDO4pxCf3JwGz2GiJL2Ej4K2bKaA=="+ },"node_modules/@uidotdev/usehooks": {"version": "2.4.1","resolved": "https://registry.npmjs.org/@uidotdev/usehooks/-/usehooks-2.4.1.tgz",@@ -3749,6 +3903,27 @@"react-dom": ">=18.0.0"}},+ "node_modules/@use-gesture/core": {+ "version": "10.3.1",+ "resolved": "https://registry.npmjs.org/@use-gesture/core/-/core-10.3.1.tgz",+ "integrity": "sha512-WcINiDt8WjqBdUXye25anHiNxPc0VOrlT8F6LLkU6cycrOGUDyY/yyFmsg3k8i5OLvv25llc0QC45GhR/C8llw=="+ },+ "node_modules/@use-gesture/react": {+ "version": "10.3.1",+ "resolved": "https://registry.npmjs.org/@use-gesture/react/-/react-10.3.1.tgz",+ "integrity": "sha512-Yy19y6O2GJq8f7CHf7L0nxL8bf4PZCPaVOCgJrusOeFHY1LvHgYXnmnXg6N5iwAnbgbZCDjo60SiM6IPJi9C5g==",+ "dependencies": {+ "@use-gesture/core": "10.3.1"+ },+ "peerDependencies": {+ "react": ">= 16.8.0"+ }+ },+ "node_modules/@webgpu/types": {+ "version": "0.1.60",+ "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.60.tgz",+ "integrity": "sha512-8B/tdfRFKdrnejqmvq95ogp8tf52oZ51p3f4QD5m5Paey/qlX4Rhhy5Y8tgFMi7Ms70HzcMMw3EQjH/jdhTwlA=="+ },"node_modules/aggregate-error": {"version": "3.1.0","resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz",@@ -3869,6 +4044,25 @@"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz","integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="},+ "node_modules/base64-js": {+ "version": "1.5.1",+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",+ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/feross"+ },+ {+ "type": "patreon",+ "url": "https://www.patreon.com/feross"+ },+ {+ "type": "consulting",+ "url": "https://feross.org/support"+ }+ ]+ },"node_modules/better-auth": {"version": "1.2.3","resolved": "https://registry.npmjs.org/better-auth/-/better-auth-1.2.3.tgz",@@ -3900,6 +4094,14 @@"uncrypto": "^0.1.3"}},+ "node_modules/bidi-js": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/bidi-js/-/bidi-js-1.0.3.tgz",+ "integrity": "sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==",+ "dependencies": {+ "require-from-string": "^2.0.2"+ }+ },"node_modules/binary-extensions": {"version": "2.3.0","resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",@@ -3937,6 +4139,29 @@"node": ">=8"}},+ "node_modules/buffer": {+ "version": "6.0.3",+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",+ "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/feross"+ },+ {+ "type": "patreon",+ "url": "https://www.patreon.com/feross"+ },+ {+ "type": "consulting",+ "url": "https://feross.org/support"+ }+ ],+ "dependencies": {+ "base64-js": "^1.3.1",+ "ieee754": "^1.2.1"+ }+ },"node_modules/buffer-from": {"version": "1.1.2","resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",@@ -3971,6 +4196,14 @@"node": ">= 6"}},+ "node_modules/camera-controls": {+ "version": "2.10.1",+ "resolved": "https://registry.npmjs.org/camera-controls/-/camera-controls-2.10.1.tgz",+ "integrity": "sha512-KnaKdcvkBJ1Irbrzl8XD6WtZltkRjp869Jx8c0ujs9K+9WD+1D7ryBsCiVqJYUqt6i/HR5FxT7RLASieUD+Q5w==",+ "peerDependencies": {+ "three": ">=0.126.1"+ }+ },"node_modules/caniuse-lite": {"version": "1.0.30001695","resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001695.tgz",@@ -4629,6 +4862,23 @@"resolved": "https://registry.npmjs.org/countup.js/-/countup.js-2.8.0.tgz","integrity": "sha512-f7xEhX0awl4NOElHulrl4XRfKoNH3rB+qfNSZZyjSZhaAoUk6elvhH+MNxMmlmuUJ2/QNTWPSA7U4mNtIAKljQ=="},+ "node_modules/cross-env": {+ "version": "7.0.3",+ "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz",+ "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==",+ "dependencies": {+ "cross-spawn": "^7.0.1"+ },+ "bin": {+ "cross-env": "src/bin/cross-env.js",+ "cross-env-shell": "src/bin/cross-env-shell.js"+ },+ "engines": {+ "node": ">=10.14",+ "npm": ">=6",+ "yarn": ">=1"+ }+ },"node_modules/cross-spawn": {"version": "7.0.6","resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",@@ -4702,6 +4952,17 @@"resolved": "https://registry.npmjs.org/d3-format/-/d3-format-1.4.5.tgz","integrity": "sha512-J0piedu6Z8iB6TbIGfZgDzfXxUFN3qQRMofy2oPdXzQibYGqPB/9iMcxr/TGalU+2RsyDO+U4f33id8tbnSRMQ=="},+ "node_modules/d3-geo": {+ "version": "3.1.1",+ "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-3.1.1.tgz",+ "integrity": "sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q==",+ "dependencies": {+ "d3-array": "2.5.0 - 3"+ },+ "engines": {+ "node": ">=12"+ }+ },"node_modules/d3-interpolate": {"version": "3.0.1","resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz",@@ -4859,6 +5120,14 @@"deps-stop": "bin/deps-stop.sh"}},+ "node_modules/detect-gpu": {+ "version": "5.0.70",+ "resolved": "https://registry.npmjs.org/detect-gpu/-/detect-gpu-5.0.70.tgz",+ "integrity": "sha512-bqerEP1Ese6nt3rFkwPnGbsUF9a4q+gMmpTVVOEzoCyeCc+y7/RvJnQZJx1JwhgQI5Ntg0Kgat8Uu7XpBqnz1w==",+ "dependencies": {+ "webgl-constants": "^1.1.1"+ }+ },"node_modules/detect-libc": {"version": "2.0.3","resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz",@@ -4905,6 +5174,11 @@"csstype": "^3.0.2"}},+ "node_modules/draco3d": {+ "version": "1.5.7",+ "resolved": "https://registry.npmjs.org/draco3d/-/draco3d-1.5.7.tgz",+ "integrity": "sha512-m6WCKt/erDXcw+70IJXnG7M3awwQPAsZvJGX5zY7beBqpELw6RDGkYVU0W43AFxye4pDZ5i2Lbyc/NNGqwjUVQ=="+ },"node_modules/drizzle-kit": {"version": "0.30.2","resolved": "https://registry.npmjs.org/drizzle-kit/-/drizzle-kit-0.30.2.tgz",@@ -5080,6 +5354,11 @@"reusify": "^1.0.4"}},+ "node_modules/fflate": {+ "version": "0.8.2",+ "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz",+ "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A=="+ },"node_modules/fill-range": {"version": "7.1.1","resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",@@ -5279,6 +5558,11 @@"node": "*"}},+ "node_modules/glsl-noise": {+ "version": "0.0.0",+ "resolved": "https://registry.npmjs.org/glsl-noise/-/glsl-noise-0.0.0.tgz",+ "integrity": "sha512-b/ZCF6amfAUb7dJM/MxRs7AetQEahYzJ8PtgfrmEdtw6uyGOr+ZSGtgjFm6mfsBkxJ4d2W7kg+Nlqzqvn3Bc0w=="+ },"node_modules/graceful-fs": {"version": "4.2.11","resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",@@ -5303,6 +5587,11 @@"node": ">= 0.4"}},+ "node_modules/hls.js": {+ "version": "1.6.2",+ "resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.6.2.tgz",+ "integrity": "sha512-rx+pETSCJEDThm/JCm8CuadcAC410cVjb1XVXFNDKFuylaayHk1+tFxhkjvnMDAfqsJHxZXDAJ3Uc2d5xQyWlQ=="+ },"node_modules/hoist-non-react-statics": {"version": "3.3.2","resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz",@@ -5324,6 +5613,25 @@"node": ">=8.12.0"}},+ "node_modules/ieee754": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",+ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/feross"+ },+ {+ "type": "patreon",+ "url": "https://www.patreon.com/feross"+ },+ {+ "type": "consulting",+ "url": "https://feross.org/support"+ }+ ]+ },"node_modules/ignore": {"version": "5.3.2","resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",@@ -5332,6 +5640,11 @@"node": ">= 4"}},+ "node_modules/immediate": {+ "version": "3.0.6",+ "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",+ "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ=="+ },"node_modules/import-fresh": {"version": "3.3.1","resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz",@@ -5469,6 +5782,11 @@"node": ">=8"}},+ "node_modules/is-promise": {+ "version": "2.2.2",+ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz",+ "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ=="+ },"node_modules/is-stream": {"version": "2.0.1","resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",@@ -5485,6 +5803,17 @@"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz","integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="},+ "node_modules/its-fine": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/its-fine/-/its-fine-2.0.0.tgz",+ "integrity": "sha512-KLViCmWx94zOvpLwSlsx6yOCeMhZYaxrJV87Po5k/FoZzcPSahvK5qJ7fYhS61sZi5ikmh2S3Hz55A2l3U69ng==",+ "dependencies": {+ "@types/react-reconciler": "^0.28.9"+ },+ "peerDependencies": {+ "react": "^19.0.0"+ }+ },"node_modules/jackspeak": {"version": "3.4.3","resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz",@@ -5576,6 +5905,14 @@"resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz","integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA=="},+ "node_modules/lie": {+ "version": "3.3.0",+ "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz",+ "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==",+ "dependencies": {+ "immediate": "~3.0.5"+ }+ },"node_modules/lilconfig": {"version": "3.1.3","resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz",@@ -5631,6 +5968,15 @@"node": ">=12"}},+ "node_modules/maath": {+ "version": "0.10.8",+ "resolved": "https://registry.npmjs.org/maath/-/maath-0.10.8.tgz",+ "integrity": "sha512-tRvbDF0Pgqz+9XUa4jjfgAQ8/aPKmQdWXilFu2tMy4GWj4NOsx99HlULO4IeREfbO3a0sA145DZYyvXPkybm0g==",+ "peerDependencies": {+ "@types/three": ">=0.134.0",+ "three": ">=0.134.0"+ }+ },"node_modules/memoize-one": {"version": "6.0.0","resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-6.0.0.tgz",@@ -5649,6 +5995,19 @@"node": ">= 8"}},+ "node_modules/meshline": {+ "version": "3.3.1",+ "resolved": "https://registry.npmjs.org/meshline/-/meshline-3.3.1.tgz",+ "integrity": "sha512-/TQj+JdZkeSUOl5Mk2J7eLcYTLiQm2IDzmlSvYm7ov15anEcDJ92GHqqazxTSreeNgfnYu24kiEvvv0WlbCdFQ==",+ "peerDependencies": {+ "three": ">=0.137"+ }+ },+ "node_modules/meshoptimizer": {+ "version": "0.18.1",+ "resolved": "https://registry.npmjs.org/meshoptimizer/-/meshoptimizer-0.18.1.tgz",+ "integrity": "sha512-ZhoIoL7TNV4s5B6+rx5mC//fw8/POGyNxS/DZyCJeiZ12ScLfVwRE/GfsxwiTkMYYD5DmK2/JXnEVXqL4rF+Sw=="+ },"node_modules/micromatch": {"version": "4.0.8","resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",@@ -6190,6 +6549,20 @@"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==","dev": true},+ "node_modules/potpack": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/potpack/-/potpack-1.0.2.tgz",+ "integrity": "sha512-choctRBIV9EMT9WGAZHn3V7t0Z2pMQyl0EZE6pFc/6ml3ssw7Dlf/oAOvFwjm1HVsqfQN8GfeFyJ+d8tRzqueQ=="+ },+ "node_modules/promise-worker-transferable": {+ "version": "1.0.4",+ "resolved": "https://registry.npmjs.org/promise-worker-transferable/-/promise-worker-transferable-1.0.4.tgz",+ "integrity": "sha512-bN+0ehEnrXfxV2ZQvU2PetO0n4gqBD4ulq3MI1WOPLgr7/Mg9yRQkX5+0v1vagr74ZTsl7XtzlaYDo2EuCeYJw==",+ "dependencies": {+ "is-promise": "^2.1.0",+ "lie": "^3.0.2"+ }+ },"node_modules/prop-types": {"version": "15.8.1","resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",@@ -6376,6 +6749,20 @@"react-dom": "^19.0.0"}},+ "node_modules/react-reconciler": {+ "version": "0.31.0",+ "resolved": "https://registry.npmjs.org/react-reconciler/-/react-reconciler-0.31.0.tgz",+ "integrity": "sha512-7Ob7Z+URmesIsIVRjnLoDGwBEG/tVitidU0nMsqX/eeJaLY89RISO/10ERe0MqmzuKUUB1rmY+h1itMbUHg9BQ==",+ "dependencies": {+ "scheduler": "^0.25.0"+ },+ "engines": {+ "node": ">=0.10.0"+ },+ "peerDependencies": {+ "react": "^19.0.0"+ }+ },"node_modules/react-remove-scroll": {"version": "2.6.3","resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.6.3.tgz",@@ -6477,6 +6864,20 @@"react-dom": ">=16.6.0"}},+ "node_modules/react-use-measure": {+ "version": "2.1.7",+ "resolved": "https://registry.npmjs.org/react-use-measure/-/react-use-measure-2.1.7.tgz",+ "integrity": "sha512-KrvcAo13I/60HpwGO5jpW7E9DfusKyLPLvuHlUyP5zqnmAPhNc6qTRjUQrdTADl0lpPpDVU2/Gg51UlOGHXbdg==",+ "peerDependencies": {+ "react": ">=16.13",+ "react-dom": ">=16.13"+ },+ "peerDependenciesMeta": {+ "react-dom": {+ "optional": true+ }+ }+ },"node_modules/read-cache": {"version": "1.0.0","resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz",@@ -6517,6 +6918,14 @@"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz","integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw=="},+ "node_modules/require-from-string": {+ "version": "2.0.2",+ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",+ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",+ "engines": {+ "node": ">=0.10.0"+ }+ },"node_modules/resolve": {"version": "1.22.10","resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz",@@ -6875,6 +7284,29 @@"react-dom": "^16.x || ^17.x || ^18.x"}},+ "node_modules/stats-gl": {+ "version": "2.4.2",+ "resolved": "https://registry.npmjs.org/stats-gl/-/stats-gl-2.4.2.tgz",+ "integrity": "sha512-g5O9B0hm9CvnM36+v7SFl39T7hmAlv541tU81ME8YeSb3i1CIP5/QdDeSB3A0la0bKNHpxpwxOVRo2wFTYEosQ==",+ "dependencies": {+ "@types/three": "*",+ "three": "^0.170.0"+ },+ "peerDependencies": {+ "@types/three": "*",+ "three": "*"+ }+ },+ "node_modules/stats-gl/node_modules/three": {+ "version": "0.170.0",+ "resolved": "https://registry.npmjs.org/three/-/three-0.170.0.tgz",+ "integrity": "sha512-FQK+LEpYc0fBD+J8g6oSEyyNzjp+Q7Ks1C568WWaoMRLW+TkNNWmenWeGgJjV105Gd+p/2ql1ZcjYvNiPZBhuQ=="+ },+ "node_modules/stats.js": {+ "version": "0.17.0",+ "resolved": "https://registry.npmjs.org/stats.js/-/stats.js-0.17.0.tgz",+ "integrity": "sha512-hNKz8phvYLPEcRkeG1rsGmV5ChMjKDAWU7/OJJdDErPBNChQXxCo3WZurGpnWc6gZhAzEPFad1aVgyOANH1sMw=="+ },"node_modules/streamsearch": {"version": "1.1.0","resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz",@@ -7058,6 +7490,14 @@"url": "https://github.com/sponsors/ljharb"}},+ "node_modules/suspend-react": {+ "version": "0.1.3",+ "resolved": "https://registry.npmjs.org/suspend-react/-/suspend-react-0.1.3.tgz",+ "integrity": "sha512-aqldKgX9aZqpoDp3e8/BZ8Dm7x1pJl+qI3ZKxDN0i/IQTWUwBx/ManmlVJ3wowqbno6c2bmiIfs+Um6LbsjJyQ==",+ "peerDependencies": {+ "react": ">=17.0"+ }+ },"node_modules/tailwind-merge": {"version": "2.6.0","resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.6.0.tgz",@@ -7169,6 +7609,40 @@"node": ">=0.8"}},+ "node_modules/three": {+ "version": "0.175.0",+ "resolved": "https://registry.npmjs.org/three/-/three-0.175.0.tgz",+ "integrity": "sha512-nNE3pnTHxXN/Phw768u0Grr7W4+rumGg/H6PgeseNJojkJtmeHJfZWi41Gp2mpXl1pg1pf1zjwR4McM1jTqkpg=="+ },+ "node_modules/three-mesh-bvh": {+ "version": "0.8.3",+ "resolved": "https://registry.npmjs.org/three-mesh-bvh/-/three-mesh-bvh-0.8.3.tgz",+ "integrity": "sha512-4G5lBaF+g2auKX3P0yqx+MJC6oVt6sB5k+CchS6Ob0qvH0YIhuUk1eYr7ktsIpY+albCqE80/FVQGV190PmiAg==",+ "peerDependencies": {+ "three": ">= 0.159.0"+ }+ },+ "node_modules/three-stdlib": {+ "version": "2.35.15",+ "resolved": "https://registry.npmjs.org/three-stdlib/-/three-stdlib-2.35.15.tgz",+ "integrity": "sha512-2XbhiOV7jVCchUoWxTmsj5dNhTe8eYb58Nyrfoa2F2yL+6h/+2VRaU2gENljRW1d/P1mk4/uwNzbdkKWV3hwzw==",+ "dependencies": {+ "@types/draco3d": "^1.4.0",+ "@types/offscreencanvas": "^2019.6.4",+ "@types/webxr": "^0.5.2",+ "draco3d": "^1.4.1",+ "fflate": "^0.6.9",+ "potpack": "^1.0.1"+ },+ "peerDependencies": {+ "three": ">=0.128.0"+ }+ },+ "node_modules/three-stdlib/node_modules/fflate": {+ "version": "0.6.10",+ "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.6.10.tgz",+ "integrity": "sha512-IQrh3lEPM93wVCEczc9SaAOvkmcoQn/G8Bo1e8ZPlY3X3bnAxWaBdvTdvM1hP62iZp0BXWDy4vTAy4fF0+Dlpg=="+ },"node_modules/to-regex-range": {"version": "5.0.1","resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",@@ -7180,6 +7654,33 @@"node": ">=8.0"}},+ "node_modules/troika-three-text": {+ "version": "0.52.4",+ "resolved": "https://registry.npmjs.org/troika-three-text/-/troika-three-text-0.52.4.tgz",+ "integrity": "sha512-V50EwcYGruV5rUZ9F4aNsrytGdKcXKALjEtQXIOBfhVoZU9VAqZNIoGQ3TMiooVqFAbR1w15T+f+8gkzoFzawg==",+ "dependencies": {+ "bidi-js": "^1.0.2",+ "troika-three-utils": "^0.52.4",+ "troika-worker-utils": "^0.52.0",+ "webgl-sdf-generator": "1.1.1"+ },+ "peerDependencies": {+ "three": ">=0.125.0"+ }+ },+ "node_modules/troika-three-utils": {+ "version": "0.52.4",+ "resolved": "https://registry.npmjs.org/troika-three-utils/-/troika-three-utils-0.52.4.tgz",+ "integrity": "sha512-NORAStSVa/BDiG52Mfudk4j1FG4jC4ILutB3foPnfGbOeIs9+G5vZLa0pnmnaftZUGm4UwSoqEpWdqvC7zms3A==",+ "peerDependencies": {+ "three": ">=0.125.0"+ }+ },+ "node_modules/troika-worker-utils": {+ "version": "0.52.0",+ "resolved": "https://registry.npmjs.org/troika-worker-utils/-/troika-worker-utils-0.52.0.tgz",+ "integrity": "sha512-W1CpvTHykaPH5brv5VHLfQo9D1OYuo0cSBEUQFFT/nBUzM8iD6Lq2/tgG/f1OelbAS1WtaTPQzE5uM49egnngw=="+ },"node_modules/ts-interface-checker": {"version": "0.1.13","resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz",@@ -7191,6 +7692,41 @@"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz","integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="},+ "node_modules/tunnel-rat": {+ "version": "0.1.2",+ "resolved": "https://registry.npmjs.org/tunnel-rat/-/tunnel-rat-0.1.2.tgz",+ "integrity": "sha512-lR5VHmkPhzdhrM092lI2nACsLO4QubF0/yoOhzX7c+wIpbN1GjHNzCc91QlpxBi+cnx8vVJ+Ur6vL5cEoQPFpQ==",+ "dependencies": {+ "zustand": "^4.3.2"+ }+ },+ "node_modules/tunnel-rat/node_modules/zustand": {+ "version": "4.5.6",+ "resolved": "https://registry.npmjs.org/zustand/-/zustand-4.5.6.tgz",+ "integrity": "sha512-ibr/n1hBzLLj5Y+yUcU7dYw8p6WnIVzdJbnX+1YpaScvZVF2ziugqHs+LAmHw4lWO9c/zRj+K1ncgWDQuthEdQ==",+ "dependencies": {+ "use-sync-external-store": "^1.2.2"+ },+ "engines": {+ "node": ">=12.7.0"+ },+ "peerDependencies": {+ "@types/react": ">=16.8",+ "immer": ">=9.0.6",+ "react": ">=16.8"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "immer": {+ "optional": true+ },+ "react": {+ "optional": true+ }+ }+ },"node_modules/type-fest": {"version": "0.6.0","resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz",@@ -7287,12 +7823,28 @@}}},+ "node_modules/use-sync-external-store": {+ "version": "1.5.0",+ "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.5.0.tgz",+ "integrity": "sha512-Rb46I4cGGVBmjamjphe8L/UnvJD+uPPtTkNvX5mZgqdbavhI4EbgIWJiIHXJ8bc/i9EQGPRh4DwEURJ552Do0A==",+ "peerDependencies": {+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"+ }+ },"node_modules/util-deprecate": {"version": "1.0.2","resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz","integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==","dev": true},+ "node_modules/utility-types": {+ "version": "3.11.0",+ "resolved": "https://registry.npmjs.org/utility-types/-/utility-types-3.11.0.tgz",+ "integrity": "sha512-6Z7Ma2aVEWisaL6TvBCy7P8rm2LQoPv6dJ7ecIaIixHcwfbJ0x7mWdbcwlIM5IGQxPZSFYeqRCqlOOeKoJYMkw==",+ "engines": {+ "node": ">= 4"+ }+ },"node_modules/valibot": {"version": "1.0.0-beta.15","resolved": "https://registry.npmjs.org/valibot/-/valibot-1.0.0-beta.15.tgz",@@ -7315,6 +7867,16 @@"spdx-expression-parse": "^3.0.0"}},+ "node_modules/webgl-constants": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/webgl-constants/-/webgl-constants-1.1.1.tgz",+ "integrity": "sha512-LkBXKjU5r9vAW7Gcu3T5u+5cvSvh5WwINdr0C+9jpzVB41cjQAP5ePArDtk/WHYdVj0GefCgM73BA7FlIiNtdg=="+ },+ "node_modules/webgl-sdf-generator": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/webgl-sdf-generator/-/webgl-sdf-generator-1.1.1.tgz",+ "integrity": "sha512-9Z0JcMTFxeE+b2x1LJTdnaT8rT8aEp7MVxkNwoycNmJWwPdzoXzMh0BjJSh/AEFP+KPYZUli814h8bJZFIZ2jA=="+ },"node_modules/which": {"version": "2.0.2","resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",diff --git a/client/package.json b/client/package.jsonindex 7bca5f62e..98d29e4d9 100644--- a/client/package.json+++ b/client/package.json@@ -29,6 +29,8 @@"@radix-ui/react-tabs": "^1.1.3","@radix-ui/react-tooltip": "^1.1.8","@radix-ui/themes": "^3.2.0",+ "@react-three/drei": "^10.0.6",+ "@react-three/fiber": "^9.1.2","@tanstack/react-query": "^5.64.2","@tanstack/react-query-devtools": "^5.64.2","@tanstack/react-table": "^8.21.2",@@ -41,6 +43,7 @@"cmdk": "^1.0.0","countries-list": "^3.1.1","country-flag-icons": "^1.5.14",+ "d3-geo": "^3.1.1","date-fns": "^4.1.0","deps": "^1.0.0","geojson": "^0.5.0",@@ -62,6 +65,7 @@"spinners-react": "^1.0.10","tailwind-merge": "^2.6.0","tailwindcss-animate": "^1.0.7",+ "three": "^0.175.0","zustand": "^5.0.3"},"devDependencies": {diff --git a/client/src/api/analytics/useGetLiveSessionLocations.ts b/client/src/api/analytics/useGetLiveSessionLocations.tsindex fd8bf6aac..d82e6918a 100644--- a/client/src/api/analytics/useGetLiveSessionLocations.ts+++ b/client/src/api/analytics/useGetLiveSessionLocations.ts@@ -10,12 +10,14 @@ export type LiveSessionLocation = {city: string;};-export function useGetLiveSessionLocations() {+export function useGetLiveSessionLocations(minutes = 5) {const { site } = useStore();return useQuery<LiveSessionLocation[]>({queryKey: ["live-session-locations", site],queryFn: () =>- authedFetch(`${BACKEND_URL}/live-session-locations/${site}`)+ authedFetch(+ `${BACKEND_URL}/live-session-locations/${site}?time=${minutes}`+ ).then((res) => res.json()).then((data) => data.data),});diff --git a/client/src/app/[site]/realtime/RealtimeMap/RealtimeGlobe.tsx b/client/src/app/[site]/realtime/RealtimeMap/RealtimeGlobe.tsxnew file mode 100644index 000000000..b784eb15d--- /dev/null+++ b/client/src/app/[site]/realtime/RealtimeMap/RealtimeGlobe.tsx@@ -0,0 +1,3 @@+export function RealtimeGlobe() {+ return <div>RealtimeGlobe</div>;+}diff --git a/client/src/app/[site]/realtime/page.tsx b/client/src/app/[site]/realtime/page.tsxindex 80b7ac92f..68ecc1452 100644--- a/client/src/app/[site]/realtime/page.tsx+++ b/client/src/app/[site]/realtime/page.tsx@@ -5,13 +5,13 @@ import { Events } from "../main/components/sections/Events";import { Pages } from "../main/components/sections/Pages";import { Referrers } from "../main/components/sections/Referrers";import { RealtimeChart } from "./RealtimeChart/RealtimeChart";-import { RealtimeMap } from "./RealtimeMap/RealtimeMap";+import { RealtimeGlobe } from "./RealtimeMap/RealtimeGlobe";export default function RealtimePage() {return (<div className="flex flex-col gap-4"><RealtimeChart />- <RealtimeMap />+ <RealtimeGlobe /><div className="grid grid-cols-1 md:grid-cols-2 gap-4"><Pages isRealtime /><Events isRealtime />diff --git a/server/src/api/analytics/getLiveSessionLocations.ts b/server/src/api/analytics/getLiveSessionLocations.tsindex bfcf58c8d..fca8a9342 100644--- a/server/src/api/analytics/getLiveSessionLocations.ts+++ b/server/src/api/analytics/getLiveSessionLocations.ts@@ -7,6 +7,9 @@ export async function getLiveSessionLocations(Params: {site: string;};+ Querystring: {+ time: number;+ };}>,res: FastifyReply) {@@ -24,7 +27,7 @@ WITH stuff AS (pageviewsWHEREsite_id = {site:Int32}- AND timestamp > now() - interval '30 minute'+ AND timestamp > now() - interval '{time:Int32} minute'GROUP BYsession_id)@@ -41,6 +44,7 @@ GROUP BYcity`,query_params: {site,+ time: req.query.time,},format: "JSONEachRow",});