@@ -11,7 +11,6 @@
1111 "@googleapis/customsearch": "^7.0.1",
1212 "@tailwindcss/typography": "^0.5.19",
1313 "autoprefixer": "^10.4.17",
14- "better-sqlite3": "^12.5.0",
1514 "drizzle-kit": "^0.31.8",
1615 "drizzle-orm": "^0.45.1",
1716 "googleapis": "^169.0.0",
@@ -20,6 +19,7 @@
2019 "next": "^16.0.10",
2120 "ollama": "^0.6.3",
2221 "postcss": "^8.4.30",
22+ "postgres": "^3.4.5",
2323 "react": "18.2.0",
2424 "react-dom": "18.2.0",
2525 "react-markdown": "^10.1.0",
@@ -29,7 +29,6 @@
2929 "typescript": "^5.4.2"
3030 },
3131 "devDependencies": {
32- "@types/better-sqlite3": "^7.6.13",
3332 "@types/node": "^20.19.27",
3433 "@types/react": "^18.2.55",
3534 "@types/react-dom": "^18.2.19",
@@ -2176,16 +2175,6 @@
21762175 "tslib": "^2.4.0"
21772176 }
21782177 },
2179- "node_modules/@types/better-sqlite3": {
2180- "version": "7.6.13",
2181- "resolved": "https://registry.npmjs.org/@types/better-sqlite3/-/better-sqlite3-7.6.13.tgz",
2182- "integrity": "sha512-NMv9ASNARoKksWtsq/SHakpYAYnhBrQgGD8zkLYk/jaK8jUGn08CfEdTRgYhMypUQAfzSP8W6gNLe0q19/t4VA==",
2183- "devOptional": true,
2184- "license": "MIT",
2185- "dependencies": {
2186- "@types/node": "*"
2187- }
2188- },
21892178 "node_modules/@types/chai": {
21902179 "version": "5.2.3",
21912180 "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz",
@@ -3272,20 +3261,6 @@
32723261 "baseline-browser-mapping": "dist/cli.js"
32733262 }
32743263 },
3275- "node_modules/better-sqlite3": {
3276- "version": "12.5.0",
3277- "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-12.5.0.tgz",
3278- "integrity": "sha512-WwCZ/5Diz7rsF29o27o0Gcc1Du+l7Zsv7SYtVPG0X3G/uUI1LqdxrQI7c9Hs2FWpqXXERjW9hp6g3/tH7DlVKg==",
3279- "hasInstallScript": true,
3280- "license": "MIT",
3281- "dependencies": {
3282- "bindings": "^1.5.0",
3283- "prebuild-install": "^7.1.1"
3284- },
3285- "engines": {
3286- "node": "20.x || 22.x || 23.x || 24.x || 25.x"
3287- }
3288- },
32893264 "node_modules/bignumber.js": {
32903265 "version": "9.3.1",
32913266 "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.1.tgz",
@@ -3307,26 +3282,6 @@
33073282 "url": "https://github.com/sponsors/sindresorhus"
33083283 }
33093284 },
3310- "node_modules/bindings": {
3311- "version": "1.5.0",
3312- "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
3313- "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
3314- "license": "MIT",
3315- "dependencies": {
3316- "file-uri-to-path": "1.0.0"
3317- }
3318- },
3319- "node_modules/bl": {
3320- "version": "4.1.0",
3321- "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
3322- "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
3323- "license": "MIT",
3324- "dependencies": {
3325- "buffer": "^5.5.0",
3326- "inherits": "^2.0.4",
3327- "readable-stream": "^3.4.0"
3328- }
3329- },
33303285 "node_modules/brace-expansion": {
33313286 "version": "1.1.12",
33323287 "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
@@ -3383,30 +3338,6 @@
33833338 "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
33843339 }
33853340 },
3386- "node_modules/buffer": {
3387- "version": "5.7.1",
3388- "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
3389- "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
3390- "funding": [
3391- {
3392- "type": "github",
3393- "url": "https://github.com/sponsors/feross"
3394- },
3395- {
3396- "type": "patreon",
3397- "url": "https://www.patreon.com/feross"
3398- },
3399- {
3400- "type": "consulting",
3401- "url": "https://feross.org/support"
3402- }
3403- ],
3404- "license": "MIT",
3405- "dependencies": {
3406- "base64-js": "^1.3.1",
3407- "ieee754": "^1.1.13"
3408- }
3409- },
34103341 "node_modules/buffer-equal-constant-time": {
34113342 "version": "1.0.1",
34123343 "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
@@ -3619,12 +3550,6 @@
36193550 "node": ">= 6"
36203551 }
36213552 },
3622- "node_modules/chownr": {
3623- "version": "1.1.4",
3624- "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
3625- "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==",
3626- "license": "ISC"
3627- },
36283553 "node_modules/client-only": {
36293554 "version": "0.0.1",
36303555 "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",
@@ -3816,30 +3741,6 @@
38163741 "url": "https://github.com/sponsors/wooorm"
38173742 }
38183743 },
3819- "node_modules/decompress-response": {
3820- "version": "6.0.0",
3821- "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
3822- "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
3823- "license": "MIT",
3824- "dependencies": {
3825- "mimic-response": "^3.1.0"
3826- },
3827- "engines": {
3828- "node": ">=10"
3829- },
3830- "funding": {
3831- "url": "https://github.com/sponsors/sindresorhus"
3832- }
3833- },
3834- "node_modules/deep-extend": {
3835- "version": "0.6.0",
3836- "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
3837- "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
3838- "license": "MIT",
3839- "engines": {
3840- "node": ">=4.0.0"
3841- }
3842- },
38433744 "node_modules/deep-is": {
38443745 "version": "0.1.4",
38453746 "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
@@ -3906,6 +3807,7 @@
39063807 "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
39073808 "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
39083809 "license": "Apache-2.0",
3810+ "optional": true,
39093811 "engines": {
39103812 "node": ">=8"
39113813 }
@@ -4142,15 +4044,6 @@
41424044 "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
41434045 "license": "MIT"
41444046 },
4145- "node_modules/end-of-stream": {
4146- "version": "1.4.5",
4147- "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz",
4148- "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==",
4149- "license": "MIT",
4150- "dependencies": {
4151- "once": "^1.4.0"
4152- }
4153- },
41544047 "node_modules/es-abstract": {
41554048 "version": "1.24.1",
41564049 "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.1.tgz",
@@ -4874,15 +4767,6 @@
48744767 "node": ">=0.10.0"
48754768 }
48764769 },
4877- "node_modules/expand-template": {
4878- "version": "2.0.3",
4879- "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz",
4880- "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==",
4881- "license": "(MIT OR WTFPL)",
4882- "engines": {
4883- "node": ">=6"
4884- }
4885- },
48864770 "node_modules/expect-type": {
48874771 "version": "1.3.0",
48884772 "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.3.0.tgz",
@@ -5000,12 +4884,6 @@
50004884 "node": "^10.12.0 || >=12.0.0"
50014885 }
50024886 },
5003- "node_modules/file-uri-to-path": {
5004- "version": "1.0.0",
5005- "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
5006- "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
5007- "license": "MIT"
5008- },
50094887 "node_modules/fill-range": {
50104888 "version": "7.1.1",
50114889 "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
@@ -5114,12 +4992,6 @@
51144992 "url": "https://github.com/sponsors/rawify"
51154993 }
51164994 },
5117- "node_modules/fs-constants": {
5118- "version": "1.0.0",
5119- "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
5120- "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
5121- "license": "MIT"
5122- },
51234995 "node_modules/fs.realpath": {
51244996 "version": "1.0.0",
51254997 "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
@@ -5346,12 +5218,6 @@
53465218 "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1"
53475219 }
53485220 },
5349- "node_modules/github-from-package": {
5350- "version": "0.0.0",
5351- "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz",
5352- "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==",
5353- "license": "MIT"
5354- },
53555221 "node_modules/glob": {
53565222 "version": "7.1.7",
53575223 "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz",
@@ -5721,26 +5587,6 @@
57215587 "node": ">= 14"
57225588 }
57235589 },
5724- "node_modules/ieee754": {
5725- "version": "1.2.1",
5726- "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
5727- "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
5728- "funding": [
5729- {
5730- "type": "github",
5731- "url": "https://github.com/sponsors/feross"
5732- },
5733- {
5734- "type": "patreon",
5735- "url": "https://www.patreon.com/feross"
5736- },
5737- {
5738- "type": "consulting",
5739- "url": "https://feross.org/support"
5740- }
5741- ],
5742- "license": "BSD-3-Clause"
5743- },
57445590 "node_modules/ignore": {
57455591 "version": "5.3.2",
57465592 "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
@@ -5794,12 +5640,7 @@
57945640 "version": "2.0.4",
57955641 "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
57965642 "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
5797- "license": "ISC"
5798- },
5799- "node_modules/ini": {
5800- "version": "1.3.8",
5801- "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
5802- "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
5643+ "devOptional": true,
58035644 "license": "ISC"
58045645 },
58055646 "node_modules/inline-style-parser": {
@@ -7518,18 +7359,6 @@
75187359 "node": ">=8.6"
75197360 }
75207361 },
7521- "node_modules/mimic-response": {
7522- "version": "3.1.0",
7523- "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
7524- "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
7525- "license": "MIT",
7526- "engines": {
7527- "node": ">=10"
7528- },
7529- "funding": {
7530- "url": "https://github.com/sponsors/sindresorhus"
7531- }
7532- },
75337362 "node_modules/minimatch": {
75347363 "version": "3.1.2",
75357364 "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
@@ -7547,6 +7376,7 @@
75477376 "version": "1.2.8",
75487377 "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
75497378 "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
7379+ "devOptional": true,
75507380 "license": "MIT",
75517381 "funding": {
75527382 "url": "https://github.com/sponsors/ljharb"
@@ -7561,12 +7391,6 @@
75617391 "node": ">=16 || 14 >=14.17"
75627392 }
75637393 },
7564- "node_modules/mkdirp-classic": {
7565- "version": "0.5.3",
7566- "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
7567- "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",
7568- "license": "MIT"
7569- },
75707394 "node_modules/mrmime": {
75717395 "version": "2.0.1",
75727396 "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.1.tgz",
@@ -7612,12 +7436,6 @@
76127436 "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
76137437 }
76147438 },
7615- "node_modules/napi-build-utils": {
7616- "version": "2.0.0",
7617- "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz",
7618- "integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==",
7619- "license": "MIT"
7620- },
76217439 "node_modules/napi-postinstall": {
76227440 "version": "0.3.4",
76237441 "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.4.tgz",
@@ -7721,18 +7539,6 @@
77217539 "node": "^10 || ^12 || >=14"
77227540 }
77237541 },
7724- "node_modules/node-abi": {
7725- "version": "3.85.0",
7726- "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.85.0.tgz",
7727- "integrity": "sha512-zsFhmbkAzwhTft6nd3VxcG0cvJsT70rL+BIGHWVq5fi6MwGrHwzqKaxXE+Hl2GmnGItnDKPPkO5/LQqjVkIdFg==",
7728- "license": "MIT",
7729- "dependencies": {
7730- "semver": "^7.3.5"
7731- },
7732- "engines": {
7733- "node": ">=10"
7734- }
7735- },
77367542 "node_modules/node-domexception": {
77377543 "version": "1.0.0",
77387544 "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
@@ -7940,6 +7746,7 @@
79407746 "version": "1.4.0",
79417747 "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
79427748 "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
7749+ "devOptional": true,
79437750 "license": "ISC",
79447751 "dependencies": {
79457752 "wrappy": "1"
@@ -8327,30 +8134,17 @@
83278134 "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
83288135 "license": "MIT"
83298136 },
8330- "node_modules/prebuild-install": {
8331- "version": "7.1.3",
8332- "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz",
8333- "integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==",
8334- "license": "MIT",
8335- "dependencies": {
8336- "detect-libc": "^2.0.0",
8337- "expand-template": "^2.0.3",
8338- "github-from-package": "0.0.0",
8339- "minimist": "^1.2.3",
8340- "mkdirp-classic": "^0.5.3",
8341- "napi-build-utils": "^2.0.0",
8342- "node-abi": "^3.3.0",
8343- "pump": "^3.0.0",
8344- "rc": "^1.2.7",
8345- "simple-get": "^4.0.0",
8346- "tar-fs": "^2.0.0",
8347- "tunnel-agent": "^0.6.0"
8348- },
8349- "bin": {
8350- "prebuild-install": "bin.js"
8351- },
8137+ "node_modules/postgres": {
8138+ "version": "3.4.7",
8139+ "resolved": "https://registry.npmjs.org/postgres/-/postgres-3.4.7.tgz",
8140+ "integrity": "sha512-Jtc2612XINuBjIl/QTWsV5UvE8UHuNblcO3vVADSrKsrc6RqGX6lOW1cEo3CM2v0XG4Nat8nI+YM7/f26VxXLw==",
8141+ "license": "Unlicense",
83528142 "engines": {
8353- "node": ">=10"
8143+ "node": ">=12"
8144+ },
8145+ "funding": {
8146+ "type": "individual",
8147+ "url": "https://github.com/sponsors/porsager"
83548148 }
83558149 },
83568150 "node_modules/prelude-ls": {
@@ -8476,16 +8270,6 @@
84768270 "url": "https://github.com/sponsors/wooorm"
84778271 }
84788272 },
8479- "node_modules/pump": {
8480- "version": "3.0.3",
8481- "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.3.tgz",
8482- "integrity": "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==",
8483- "license": "MIT",
8484- "dependencies": {
Cut short: this commit's diff is over 1000 lines.