diff --git a/package-lock.json b/package-lock.json index 67aad41..192ea08 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "framer-motion": "^12.0.0", "html-to-image": "^1.11.13", "lucide-react": "^0.475.0", - "next": "16.2.3", + "next": "^16.2.9", "pg": "^8.20.0", "react": "19.2.3", "react-dom": "19.2.3", @@ -1446,9 +1446,9 @@ } }, "node_modules/@next/env": { - "version": "16.2.3", - "resolved": "https://registry.npmjs.org/@next/env/-/env-16.2.3.tgz", - "integrity": "sha512-ZWXyj4uNu4GCWQw9cjRxWlbD+33mcDszIo9iQxFnBX3Wmgq9ulaSJcl6VhuWx5pCWqqD+9W6Wfz7N0lM5lYPMA==", + "version": "16.2.9", + "resolved": "https://registry.npmjs.org/@next/env/-/env-16.2.9.tgz", + "integrity": "sha512-ki5VxxXfzD/9TDe13wyeTKIjQTAwBVpnr8KhRDUr8ltMUq1/NBpWNT5tiPoxiGl+PHM4X2ahSOiPk6iAimIzPg==", "license": "MIT" }, "node_modules/@next/eslint-plugin-next": { @@ -1462,9 +1462,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "16.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-16.2.3.tgz", - "integrity": "sha512-u37KDKTKQ+OQLvY+z7SNXixwo4Q2/IAJFDzU1fYe66IbCE51aDSAzkNDkWmLN0yjTUh4BKBd+hb69jYn6qqqSg==", + "version": "16.2.9", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-16.2.9.tgz", + "integrity": "sha512-HkfxNYUCmcct0Xsqib5KxqMSHV4AHJq857BNRchyBDs4YS19aHzVfn1kDuBYKqLLQBjXgnkIsjV2Kd4d2wzYhw==", "cpu": [ "arm64" ], @@ -1478,9 +1478,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "16.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-16.2.3.tgz", - "integrity": "sha512-gHjL/qy6Q6CG3176FWbAKyKh9IfntKZTB3RY/YOJdDFpHGsUDXVH38U4mMNpHVGXmeYW4wj22dMp1lTfmu/bTQ==", + "version": "16.2.9", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-16.2.9.tgz", + "integrity": "sha512-7IAtK4MeybpqRV9GRABWEhJ62mOS+rzWOzOTFie4cSEtm12xsoOMJRcECoZx3FHPzFAqN/IJtHqWAFOLfl152w==", "cpu": [ "x64" ], @@ -1494,12 +1494,15 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "16.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-16.2.3.tgz", - "integrity": "sha512-U6vtblPtU/P14Y/b/n9ZY0GOxbbIhTFuaFR7F4/uMBidCi2nSdaOFhA0Go81L61Zd6527+yvuX44T4ksnf8T+Q==", + "version": "16.2.9", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-16.2.9.tgz", + "integrity": "sha512-hBD75iWpUtkL9SmQmcRhmLomn9jgkPzCEkbOcLgHymPEKzv+6ONy13RRiIEz/iEObjkS2Jlb5gYS2XGoS3X4rw==", "cpu": [ "arm64" ], + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -1510,12 +1513,15 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "16.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-16.2.3.tgz", - "integrity": "sha512-/YV0LgjHUmfhQpn9bVoGc4x4nan64pkhWR5wyEV8yCOfwwrH630KpvRg86olQHTwHIn1z59uh6JwKvHq1h4QEw==", + "version": "16.2.9", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-16.2.9.tgz", + "integrity": "sha512-qZTI3pf9SGc/obr8NkQAekBxmp1QK+kVm+VAf3BALLfFAj+1kUhkTxmrWpVos9R/UYIA8AWX2p6cGI5WdwzVUA==", "cpu": [ "arm64" ], + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -1526,12 +1532,15 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "16.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-16.2.3.tgz", - "integrity": "sha512-/HiWEcp+WMZ7VajuiMEFGZ6cg0+aYZPqCJD3YJEfpVWQsKYSjXQG06vJP6F1rdA03COD9Fef4aODs3YxKx+RDQ==", + "version": "16.2.9", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-16.2.9.tgz", + "integrity": "sha512-xm0HfRNX+UkH4R3c18ynswjj5o5uEj/7iI9p9omdtTSIsRCzQqkGMA+10nzJ4EHnYC3as65IMhbbl5fWRUWHYg==", "cpu": [ "x64" ], + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -1542,12 +1551,15 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "16.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-16.2.3.tgz", - "integrity": "sha512-Kt44hGJfZSefebhk/7nIdivoDr3Ugp5+oNz9VvF3GUtfxutucUIHfIO0ZYO8QlOPDQloUVQn4NVC/9JvHRk9hw==", + "version": "16.2.9", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-16.2.9.tgz", + "integrity": "sha512-QumimHkGEG6vM3PfEDWKyKen03NcqLOkeKB1EfcPe7VxzmEiCa4jNnMyBn/US5zcd/VE1CI+O8Ovb3lfjVHfGw==", "cpu": [ "x64" ], + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -1558,9 +1570,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "16.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-16.2.3.tgz", - "integrity": "sha512-O2NZ9ie3Tq6xj5Z5CSwBT3+aWAMW2PIZ4egUi9MaWLkwaehgtB7YZjPm+UpcNpKOme0IQuqDcor7BsW6QBiQBw==", + "version": "16.2.9", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-16.2.9.tgz", + "integrity": "sha512-hzQpKZvw8rAwI6A2uQh6SacCSvNAXaIkPNsWwzqqfRiIMiXMfH936skDhz1OO6KpvdKkJrgHHtqQOq5PIXOvdQ==", "cpu": [ "arm64" ], @@ -1574,9 +1586,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "16.2.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-16.2.3.tgz", - "integrity": "sha512-Ibm29/GgB/ab5n7XKqlStkm54qqZE8v2FnijUPBgrd67FWrac45o/RsNlaOWjme/B5UqeWt/8KM4aWBwA1D2Kw==", + "version": "16.2.9", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-16.2.9.tgz", + "integrity": "sha512-qr2VL3Ce5QrwgO2yh1ujSBawrimjVKX8FGF/cOynmdYKJY0BdHpGVNIRK1tqONB10Vkm25Ub1BD2bkjWs4+96w==", "cpu": [ "x64" ], @@ -2744,9 +2756,9 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", - "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz", + "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==", "dev": true, "license": "MIT", "dependencies": { @@ -3131,15 +3143,15 @@ } }, "node_modules/@vitest/expect": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.4.tgz", - "integrity": "sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.6.tgz", + "integrity": "sha512-1+7q9BtaKzEmO+fmNT3kYvoNn5Y71XWAx2Q5HRim4tTVRQVRv4uJFAQ5FbK0OPUeNP/WmVCpxYxoJdvuHVjzBQ==", "dev": true, "license": "MIT", "dependencies": { "@types/chai": "^5.2.2", - "@vitest/spy": "3.2.4", - "@vitest/utils": "3.2.4", + "@vitest/spy": "3.2.6", + "@vitest/utils": "3.2.6", "chai": "^5.2.0", "tinyrainbow": "^2.0.0" }, @@ -3148,13 +3160,13 @@ } }, "node_modules/@vitest/mocker": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.4.tgz", - "integrity": "sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.6.tgz", + "integrity": "sha512-EZOrpDbkKotFAP7wPAQV1UIyoGOk4oX7ynWhBhLB7v+meMHbQhU16oPpIYGTTe4oFlhpryGpgpcZP/sin3hYuw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "3.2.4", + "@vitest/spy": "3.2.6", "estree-walker": "^3.0.3", "magic-string": "^0.30.17" }, @@ -3175,9 +3187,9 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.4.tgz", - "integrity": "sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.6.tgz", + "integrity": "sha512-lb7XXXzmm2h2ASzFnRvQpDo6onT1NmMJA3tkGTWiBFtRJ9lxGY3d3mm/Apt36gej2bkkOVLL/yTOtufDaFa/jA==", "dev": true, "license": "MIT", "dependencies": { @@ -3188,13 +3200,13 @@ } }, "node_modules/@vitest/runner": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.2.4.tgz", - "integrity": "sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.2.6.tgz", + "integrity": "sha512-HYcoSj1w5tcgUnzoF0HcyaAQjpA1gj9ftUJ7iSJSuipc02jW9gKkigwZbjFldAfYHA1fa8UZVRftdMY5msWM9Q==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "3.2.4", + "@vitest/utils": "3.2.6", "pathe": "^2.0.3", "strip-literal": "^3.0.0" }, @@ -3203,13 +3215,13 @@ } }, "node_modules/@vitest/snapshot": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.2.4.tgz", - "integrity": "sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.2.6.tgz", + "integrity": "sha512-H+ZjNTWGpObenh0YnlBctAPnJSI20P81PL8BPzWpx54YXLLTm8hEsWawtcYLMrwvpK48hGxLLbCS+1KRXhsKhw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "3.2.4", + "@vitest/pretty-format": "3.2.6", "magic-string": "^0.30.17", "pathe": "^2.0.3" }, @@ -3218,9 +3230,9 @@ } }, "node_modules/@vitest/spy": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.4.tgz", - "integrity": "sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.6.tgz", + "integrity": "sha512-oq6BbH68WzcWmwtBrU9nqLeaXTR4XwJF7FSLkKEZo4i6eoXcrxjcwSuTvWBIRUTC6VC72nXYunzqgZA+IKdtxg==", "dev": true, "license": "MIT", "dependencies": { @@ -3231,13 +3243,13 @@ } }, "node_modules/@vitest/utils": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.4.tgz", - "integrity": "sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.6.tgz", + "integrity": "sha512-lI23nIs4bnT3T8NIoh+vFaz5s2/DdP0Jgt2jxwgWljvwn82cLJtyi/If+fjFyoLMGIOz0U/fKvWE0d4jsNQEfg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "3.2.4", + "@vitest/pretty-format": "3.2.6", "loupe": "^3.1.4", "tinyrainbow": "^2.0.0" }, @@ -6620,12 +6632,12 @@ "license": "MIT" }, "node_modules/next": { - "version": "16.2.3", - "resolved": "https://registry.npmjs.org/next/-/next-16.2.3.tgz", - "integrity": "sha512-9V3zV4oZFza3PVev5/poB9g0dEafVcgNyQ8eTRop8GvxZjV2G15FC5ARuG1eFD42QgeYkzJBJzHghNP8Ad9xtA==", + "version": "16.2.9", + "resolved": "https://registry.npmjs.org/next/-/next-16.2.9.tgz", + "integrity": "sha512-MEOJiq/UvuezAdqVSceHbqDgZt1kDw2tpGVOlsdIoJsQdbN2JY2hpVG4xnXGkbdJUOEWhnRfiu/O4Hpc9Juwww==", "license": "MIT", "dependencies": { - "@next/env": "16.2.3", + "@next/env": "16.2.9", "@swc/helpers": "0.5.15", "baseline-browser-mapping": "^2.9.19", "caniuse-lite": "^1.0.30001579", @@ -6639,14 +6651,14 @@ "node": ">=20.9.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "16.2.3", - "@next/swc-darwin-x64": "16.2.3", - "@next/swc-linux-arm64-gnu": "16.2.3", - "@next/swc-linux-arm64-musl": "16.2.3", - "@next/swc-linux-x64-gnu": "16.2.3", - "@next/swc-linux-x64-musl": "16.2.3", - "@next/swc-win32-arm64-msvc": "16.2.3", - "@next/swc-win32-x64-msvc": "16.2.3", + "@next/swc-darwin-arm64": "16.2.9", + "@next/swc-darwin-x64": "16.2.9", + "@next/swc-linux-arm64-gnu": "16.2.9", + "@next/swc-linux-arm64-musl": "16.2.9", + "@next/swc-linux-x64-gnu": "16.2.9", + "@next/swc-linux-x64-musl": "16.2.9", + "@next/swc-win32-arm64-msvc": "16.2.9", + "@next/swc-win32-x64-msvc": "16.2.9", "sharp": "^0.34.5" }, "peerDependencies": { @@ -9116,20 +9128,20 @@ } }, "node_modules/vitest": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.4.tgz", - "integrity": "sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.6.tgz", + "integrity": "sha512-xejya+bT/j/+R/AGa1XOfRxLmNUlLtlwjRsFUILF+xHfzElmGcmFydy2gqqIrd62ptIEfwVMofd19uNWD9L7Nw==", "dev": true, "license": "MIT", "dependencies": { "@types/chai": "^5.2.2", - "@vitest/expect": "3.2.4", - "@vitest/mocker": "3.2.4", - "@vitest/pretty-format": "^3.2.4", - "@vitest/runner": "3.2.4", - "@vitest/snapshot": "3.2.4", - "@vitest/spy": "3.2.4", - "@vitest/utils": "3.2.4", + "@vitest/expect": "3.2.6", + "@vitest/mocker": "3.2.6", + "@vitest/pretty-format": "^3.2.6", + "@vitest/runner": "3.2.6", + "@vitest/snapshot": "3.2.6", + "@vitest/spy": "3.2.6", + "@vitest/utils": "3.2.6", "chai": "^5.2.0", "debug": "^4.4.1", "expect-type": "^1.2.1", @@ -9159,8 +9171,8 @@ "@edge-runtime/vm": "*", "@types/debug": "^4.1.12", "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", - "@vitest/browser": "3.2.4", - "@vitest/ui": "3.2.4", + "@vitest/browser": "3.2.6", + "@vitest/ui": "3.2.6", "happy-dom": "*", "jsdom": "*" }, diff --git a/package.json b/package.json index 8d71523..7ab3a9d 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "framer-motion": "^12.0.0", "html-to-image": "^1.11.13", "lucide-react": "^0.475.0", - "next": "16.2.3", + "next": "^16.2.9", "pg": "^8.20.0", "react": "19.2.3", "react-dom": "19.2.3", diff --git a/src/app/page.tsx b/src/app/page.tsx index 67f115b..69bd02e 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -11,10 +11,12 @@ import { BookOpen, Check, CircuitBoard, + FileText, FunctionSquare, Palette, PenTool, RefreshCw, + ShieldCheck, Sigma, Sparkles, Terminal, @@ -477,9 +479,27 @@ export default function Home() { {/* Footer */} diff --git a/src/app/privacy/page.tsx b/src/app/privacy/page.tsx new file mode 100644 index 0000000..15228cc --- /dev/null +++ b/src/app/privacy/page.tsx @@ -0,0 +1,12 @@ +import type { Metadata } from 'next'; +import { LegalPage } from '@/components/legal-page'; +import { privacyContent } from '@/lib/legal-content'; + +export const metadata: Metadata = { + title: 'Privacy Policy | QueryCraft', + description: privacyContent.description, +}; + +export default function PrivacyPage() { + return ; +} diff --git a/src/app/terms/page.tsx b/src/app/terms/page.tsx new file mode 100644 index 0000000..8356e6e --- /dev/null +++ b/src/app/terms/page.tsx @@ -0,0 +1,12 @@ +import type { Metadata } from 'next'; +import { LegalPage } from '@/components/legal-page'; +import { termsContent } from '@/lib/legal-content'; + +export const metadata: Metadata = { + title: 'Terms of Service | QueryCraft', + description: termsContent.description, +}; + +export default function TermsPage() { + return ; +} diff --git a/src/components/legal-page.tsx b/src/components/legal-page.tsx new file mode 100644 index 0000000..cef7a1c --- /dev/null +++ b/src/components/legal-page.tsx @@ -0,0 +1,128 @@ +import Link from 'next/link'; +import { ArrowLeft, ArrowUpRight, CircuitBoard, FileText, ShieldCheck } from 'lucide-react'; +import type { LegalPageContent } from '@/lib/legal-content'; + +type LegalPageProps = { + content: LegalPageContent; +}; + +export function LegalPage({ content }: LegalPageProps) { + const isPrivacy = content.title.toLowerCase().includes('privacy'); + const HeroIcon = isPrivacy ? ShieldCheck : FileText; + + return ( +
+
+
+
+
+ +
+
+ + + + + + QueryCraft + + + +
+ + {content.related.label} + + + + Home + +
+
+
+ +
+
+
+
+
+
+ + {content.badge} +
+

+ {content.title} +

+

+ {content.description} +

+

+ Last updated: {content.lastUpdated} +

+
+
+ +
+
+ {content.sections.map((section) => ( +
+

{section.title}

+ {section.body?.map((paragraph) => ( +

+ {paragraph} +

+ ))} + {section.bullets && ( +
    + {section.bullets.map((bullet) => ( +
  • + + {bullet} +
  • + ))} +
+ )} +
+ ))} +
+ + +
+
+
+ ); +} diff --git a/src/lib/legal-content.ts b/src/lib/legal-content.ts new file mode 100644 index 0000000..6fc80eb --- /dev/null +++ b/src/lib/legal-content.ts @@ -0,0 +1,257 @@ +export type LegalSection = { + id: string; + title: string; + body?: string[]; + bullets?: string[]; +}; + +export type LegalPageContent = { + badge: string; + title: string; + description: string; + lastUpdated: string; + sections: LegalSection[]; + related: { + label: string; + href: string; + }; +}; + +export const privacyContent: LegalPageContent = { + badge: 'Data Protection', + title: 'Privacy Policy', + description: + 'This policy explains what QueryCraft collects, why we collect it, and how user data is handled across local workspaces, test flows, browser storage, and optional AI features.', + lastUpdated: 'June 11, 2026', + related: { + label: 'Terms of Service', + href: '/terms', + }, + sections: [ + { + id: 'introduction', + title: '1. Introduction', + body: [ + 'This Privacy Policy explains how QueryCraft collects, uses, stores, and protects information when you use the Service. QueryCraft is designed primarily as a local-first educational app, but some features may use server-side APIs, configured databases, cookies, uploads, or third-party AI services.', + ], + }, + { + id: 'information-we-collect', + title: '2. Information We Collect', + body: [ + 'Depending on the features you use, QueryCraft may collect or store local account details, Test module account information, learning workspace content, test content, AI analysis inputs, and account export or import data.', + 'QueryCraft may also process browser storage data, essential cookies, request metadata, and Test DB diagnostic information when those features are used.', + ], + bullets: [ + 'Local account data: display name, account ID, role selection, creation time, and local password hash.', + 'Workspace content: SQL queries, schemas, query history, ER diagrams, normalization inputs, generated datasets, and settings.', + 'Test module data: accounts, questions, assignments, attempts, answers, scores, reviews, and uploaded faculty question files.', + 'Optional AI inputs: table names, column names, dependencies, workflow state, and sample table data submitted for analysis.', + ], + }, + { + id: 'how-we-use-information', + title: '3. How We Use Information', + body: [ + 'We use information to provide database learning workflows, store local progress, authenticate Test module users, authorize role-based access, save tests and attempts, run optional AI-assisted analysis, export user-requested outputs, diagnose errors, and protect the Service from misuse.', + ], + }, + { + id: 'local-first-storage', + title: '4. Local-First Storage', + body: [ + 'Many QueryCraft features store data directly in your browser using localStorage or sessionStorage. This may include account details, workspace state, history, preferences, diagrams, generated tables, and learning artifacts.', + 'Local browser data stays on the device and browser profile where it was created unless you export it, import it elsewhere, synchronize it through browser or operating system features, or submit it to a server-backed feature.', + ], + }, + { + id: 'cookies', + title: '5. Cookies and Browser Storage', + body: [ + 'QueryCraft uses essential browser storage and cookies for local account sessions, user-scoped workspace persistence, preferences, Test module authentication, and test workflow continuity.', + 'QueryCraft does not intentionally use advertising cookies. Analytics, monitoring, or hosting logs may depend on the deployment environment.', + ], + }, + { + id: 'ai-services', + title: '6. AI Services Disclosure', + body: [ + 'If the optional AI-assisted normalization feature is enabled and you choose to use it, QueryCraft may send selected schema, dependency, workflow, and sample data to the configured AI provider. Do not submit sensitive, confidential, proprietary, regulated, or credential-like data to this feature unless your deployment is approved for that use.', + ], + }, + { + id: 'data-security', + title: '7. Data Security', + body: [ + 'QueryCraft includes security measures appropriate to its local-first educational design. No system can guarantee absolute security, and browser storage can be exposed if your device, browser profile, extensions, or operating system are compromised.', + ], + bullets: [ + 'Workspace data is scoped by user-specific browser storage keys.', + 'Test module features may use server-signed session tokens and HTTP-only cookies.', + 'Protected Test module routes may enforce role-based access for administrators, teachers, and students.', + 'SQL sandbox execution is designed for in-browser SQLite practice rather than direct production database access.', + ], + }, + { + id: 'data-sharing', + title: '8. Data Sharing', + body: [ + 'We do not sell your personal information. Information may be shared with authorized administrators or teachers, service providers, configured database providers, AI providers when you intentionally use AI features, or when required by law, policy, security investigation, or to protect rights and safety.', + ], + }, + { + id: 'data-retention', + title: '9. Data Retention', + body: [ + 'Local account and workspace data remain in browser storage until you delete the account, clear site data, reset the browser profile, or remove the data manually. Test module data remains in the configured database until removed by an administrator, retention policy, or database maintenance process.', + ], + }, + { + id: 'your-rights', + title: '10. Your Choices and Rights', + body: [ + 'Depending on your deployment and applicable law, you may be able to view, update, export, import, or delete local accounts and local workspace data; clear browser storage and cookies; request access, correction, or deletion of Test module account data; and avoid optional AI features.', + ], + }, + { + id: 'childrens-privacy', + title: "11. Children's Privacy", + body: [ + 'QueryCraft is intended for students, teachers, administrators, and learners using the Service in permitted educational contexts. If a deployment is used by minors, the responsible institution, teacher, parent, guardian, or administrator must ensure compliance with applicable consent, privacy, and education laws.', + ], + }, + { + id: 'changes', + title: '12. Changes to This Policy', + body: [ + 'We may update this Privacy Policy periodically. Updates will be posted with a revised last updated date. Continued use of QueryCraft after changes are posted means you accept the updated policy.', + ], + }, + ], +}; + +export const termsContent: LegalPageContent = { + badge: 'Legal Document', + title: 'Terms of Service', + description: + 'Please review these terms before using QueryCraft. They explain account responsibilities, acceptable usage, educational use, and service boundaries.', + lastUpdated: 'June 11, 2026', + related: { + label: 'Privacy Policy', + href: '/privacy', + }, + sections: [ + { + id: 'acceptance', + title: '1. Acceptance of Terms', + body: [ + 'By accessing or using QueryCraft, you agree to be bound by these Terms of Service. If you do not agree to these Terms, do not use the Service.', + ], + }, + { + id: 'description', + title: '2. Description of Service', + body: [ + 'QueryCraft is an educational database learning platform. It provides tools for practicing SQL, relational algebra, tuple relational calculus, ER diagramming, database normalization, synthetic table generation, and test-based database exercises.', + 'Most learning features are local-first and run in the browser. Some features may use server-side API routes, including seed dataset loading, Test DB health checks, Test module authentication, test management, attempt submission, faculty question uploads, and optional AI-assisted normalization analysis.', + ], + }, + { + id: 'eligibility', + title: '3. Eligibility', + body: [ + 'You may use QueryCraft only if you can comply with these Terms and all applicable laws, institutional rules, or classroom policies. If QueryCraft is provided by a teacher, administrator, institution, or organization, your access may also be subject to their rules.', + ], + }, + { + id: 'accounts', + title: '4. User Accounts', + body: [ + 'QueryCraft may support local learning accounts stored on your device and Test module accounts managed by an administrator, teacher, institution, or authorized project operator.', + 'You are responsible for keeping your credentials, account export codes, device access, and browser profile secure.', + ], + }, + { + id: 'acceptable-use', + title: '5. Acceptable Use', + body: ['You agree not to misuse QueryCraft or interfere with the security, availability, or integrity of the Service.'], + bullets: [ + 'Do not access another user account, test, answer, submission, or workspace data without permission.', + 'Do not overload, exploit, probe, or disrupt QueryCraft systems, APIs, databases, or networks.', + 'Do not upload malicious files, scripts, payloads, or unauthorized content.', + 'Do not circumvent authentication, authorization, attempt controls, test restrictions, or classroom rules.', + 'Do not use automated scraping, bots, or scripts unless expressly authorized.', + ], + }, + { + id: 'academic-integrity', + title: '6. Educational Use and Academic Integrity', + body: [ + 'QueryCraft is intended to support learning and assessment. If you use QueryCraft in a class, lab, test, or institutional setting, you are responsible for following the academic integrity rules that apply to that setting.', + ], + }, + { + id: 'privacy', + title: '7. Data and Privacy', + body: [ + 'Your use of QueryCraft is also governed by the Privacy Policy, which explains how information is collected, stored, used, and protected.', + ], + }, + { + id: 'security', + title: '8. Security Measures', + body: [ + 'QueryCraft uses a local-first architecture for most learning features, with user-scoped browser storage to separate workspace data between local accounts. For Test module features, QueryCraft may use server-side authentication, HTTP-only cookies, signed session tokens, role-based access controls, database-backed test data, and server-side validation for protected routes.', + ], + }, + { + id: 'third-party-services', + title: '9. Third-Party Services', + body: [ + 'QueryCraft may use third-party services or libraries to provide parts of the Service. Optional AI-assisted normalization analysis may send sanitized schema, dependency, and sample table data to an AI provider when enabled and used. Third-party services are governed by their own terms and privacy policies.', + ], + }, + { + id: 'user-content', + title: '10. User Content', + body: [ + 'You retain responsibility for content you create, upload, import, enter, or submit in QueryCraft, including SQL statements, schemas, diagrams, generated tables, test questions, test answers, uploaded question files, and sample data.', + ], + }, + { + id: 'intellectual-property', + title: '11. Intellectual Property', + body: [ + 'QueryCraft and its original content, interface, features, and functionality are protected by applicable intellectual property laws. You may not copy, modify, distribute, or create derivative works from the Service except as permitted by the applicable project license, written permission, or law.', + ], + }, + { + id: 'availability', + title: '12. Service Availability', + body: [ + 'QueryCraft is provided on an as available basis. We do not guarantee uninterrupted access, error-free operation, data availability, or compatibility with every browser, device, or deployment environment.', + ], + }, + { + id: 'liability', + title: '13. Limitation of Liability', + body: [ + 'To the fullest extent permitted by law, QueryCraft and its maintainers, operators, contributors, administrators, or affiliated organizations will not be liable for indirect, incidental, special, consequential, exemplary, or punitive damages arising from your use of or inability to use the Service.', + ], + }, + { + id: 'termination', + title: '14. Account Suspension or Termination', + body: [ + 'We or an authorized administrator may suspend, restrict, or terminate access to QueryCraft if we believe a user has violated these Terms, misused the Service, compromised security, violated academic rules, or created risk for other users or systems.', + ], + }, + { + id: 'changes', + title: '15. Changes to These Terms', + body: [ + 'We may update these Terms from time to time. Updated terms will be posted with a revised last updated date. Continued use of QueryCraft after changes are posted means you accept the updated Terms.', + ], + }, + ], +};