xonecas.io
53129
Pa

PAT / commit 6299794

feat: use postgres with docker

xonecas2025-12-17 62997946a0a8c146ca227ec4e2eb4194ff4371d8 parent 7818d25

16 files changed

This diff is too big to show in full. The first 1000 lines are below, and every file is listed with its counts.

AGENTS.md+10−3
@@ -170,8 +170,15 @@ Add tests when prompted only.
170170
171171 ### Database Integration (Drizzle ORM)
172172
173-- **Database**: SQLite using better-sqlite3
174-- **Location**: `data/database.db` (created automatically)
173+- **Database**: PostgreSQL using postgres driver
174+- **Connection**: Requires `DATABASE_URL` environment variable (format: `postgresql://user:password@host:port/database`)
175+- **Docker Setup**: PostgreSQL runs in Docker container via `npm run start:docker` script
176+ - Container name: `postgres`
177+ - Default port: `5432` (configurable via `POSTGRES_PORT` env var)
178+ - Default database: `personal_assistant` (configurable via `POSTGRES_DB` env var)
179+ - Default user: `postgres` (configurable via `POSTGRES_USER` env var)
180+ - Requires `POSTGRES_PASSWORD` environment variable
181+ - Data persisted in Docker volume `postgres_data`
175182 - **Schema**: Defined in `src/lib/db/schema.ts`
176183 - **Connection**: Exported from `src/lib/db/index.ts` as `db`
177184 - **Tables**:
@@ -179,7 +186,7 @@ Add tests when prompted only.
179186 - `messages`: Stores messages with id, threadId, role, content, createdAt, generationTimeMs, toolCalls (JSON string of tool calls made to generate assistant messages)
180187 - **Relations**: Messages belong to threads (one-to-many)
181188 - **Types**: Type definitions for `Thread` and `Message` are exported from `src/lib/db/schema` using Drizzle's `$inferSelect` (import directly from schema, e.g., `import type { Thread, Message } from "@/src/lib/db/schema"`)
182-- **Configuration**: `drizzle.config.ts` defines schema path and database location
189+- **Configuration**: `drizzle.config.ts` defines schema path and database connection
183190 - **Migrations**: Generated in `drizzle/` directory using `npm run db:generate`
184191 - **Foreign Keys**: Enabled automatically in database connection
185192 - **Usage**: Import `db` from `src/lib/db/index.ts` to query the database
README.md+25−4
@@ -6,7 +6,7 @@ A minimal web-based personal assistant that connects to local Ollama models for
66
77 - Chat interface with conversation threads
88 - Local LLM integration via Ollama
9-- Persistent conversation history (SQLite)
9+- Persistent conversation history (PostgreSQL)
1010 - Markdown rendering with syntax highlighting
1111 - Dark/light mode support
1212 - Keyboard shortcuts for message history
@@ -14,6 +14,7 @@ A minimal web-based personal assistant that connects to local Ollama models for
1414 ## Prerequisites
1515
1616 - Node.js 20+ and npm
17+- Docker and Docker Compose (for database)
1718 - [Ollama](https://ollama.ai/) installed and running locally
1819 - At least one Ollama model pulled (default: `gpt-oss`)
1920
@@ -25,7 +26,27 @@ npm install
2526
2627 ## Setup
2728
28-Run database migrations:
29+1. Create a `.env` file with the following variables:
30+
31+```bash
32+# PostgreSQL Database
33+DATABASE_URL=postgresql://postgres:your_password@localhost:5432/personal_assistant
34+POSTGRES_PASSWORD=your_password
35+POSTGRES_USER=postgres
36+POSTGRES_DB=personal_assistant
37+POSTGRES_PORT=5432
38+
39+# Valkey (Redis-compatible cache)
40+VALKEY_PASSWORD=your_valkey_password
41+```
42+
43+2. Start Docker containers (PostgreSQL and Valkey):
44+
45+```bash
46+npm run start:docker
47+```
48+
49+3. Run database migrations:
2950
3051 ```bash
3152 npm run db:migrate
@@ -65,12 +86,12 @@ Open [http://localhost:3000](http://localhost:3000) in your browser.
6586 - `src/components/` - React components
6687 - `src/lib/` - Utility functions (Ollama client, database)
6788 - `src/types.ts` - TypeScript type definitions
68-- `data/` - SQLite database (created automatically)
89+- `scripts/` - Docker startup scripts
6990
7091 ## Tech Stack
7192
7293 - **Framework**: Next.js 16
7394 - **Language**: TypeScript
7495 - **Styling**: TailwindCSS
75-- **Database**: SQLite with Drizzle ORM
96+- **Database**: PostgreSQL with Drizzle ORM
7697 - **LLM**: Ollama
drizzle.config.ts+6−8
@@ -1,18 +1,16 @@
11 import type { Config } from "drizzle-kit";
2-import { existsSync, mkdirSync } from "fs";
3-import { join } from "path";
42
5-// Ensure data directory exists
6-const dataDir = join(process.cwd(), "data");
7-if (!existsSync(dataDir)) {
8- mkdirSync(dataDir, { recursive: true });
3+const connectionString = process.env.DATABASE_URL;
4+
5+if (!connectionString) {
6+ throw new Error("DATABASE_URL environment variable is not set");
97 }
108
119 export default {
1210 schema: "./src/lib/db/schema.ts",
1311 out: "./drizzle",
14- dialect: "sqlite",
12+ dialect: "postgresql",
1513 dbCredentials: {
16- url: "./data/database.db",
14+ url: connectionString,
1715 },
1816 } satisfies Config;
drizzle/0000_burly_pixie.sql+18−0
@@ -0,0 +1,18 @@
1+CREATE TABLE "messages" (
2+ "id" serial PRIMARY KEY NOT NULL,
3+ "thread_id" integer NOT NULL,
4+ "role" text NOT NULL,
5+ "content" text NOT NULL,
6+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
7+ "generation_time_ms" integer,
8+ "tool_calls" text
9+);
10+--> statement-breakpoint
11+CREATE TABLE "threads" (
12+ "id" serial PRIMARY KEY NOT NULL,
13+ "title" text,
14+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
15+ "updated_at" timestamp with time zone DEFAULT now() NOT NULL
16+);
17+--> statement-breakpoint
18+ALTER TABLE "messages" ADD CONSTRAINT "messages_thread_id_threads_id_fk" FOREIGN KEY ("thread_id") REFERENCES "public"."threads"("id") ON DELETE cascade ON UPDATE no action;
drizzle/0000_rich_betty_ross.sql+0−15
@@ -1,15 +0,0 @@
1-CREATE TABLE `messages` (
2- `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
3- `thread_id` integer NOT NULL,
4- `role` text NOT NULL,
5- `content` text NOT NULL,
6- `created_at` integer NOT NULL,
7- FOREIGN KEY (`thread_id`) REFERENCES `threads`(`id`) ON UPDATE no action ON DELETE cascade
8-);
9---> statement-breakpoint
10-CREATE TABLE `threads` (
11- `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
12- `title` text,
13- `created_at` integer NOT NULL,
14- `updated_at` integer NOT NULL
15-);
drizzle/0001_worthless_wolf_cub.sql+0−1
@@ -1 +0,0 @@
1-ALTER TABLE `messages` ADD `generation_time_ms` integer;
drizzle/0002_cynical_thunderbolts.sql+0−1
@@ -1 +0,0 @@
1-ALTER TABLE `messages` ADD `tool_calls` text;
drizzle/meta/0000_snapshot.json+46−33
@@ -1,46 +1,55 @@
11 {
2- "version": "6",
3- "dialect": "sqlite",
4- "id": "f2f09444-b0be-4fd4-bc43-aeb9a6479eab",
2+ "id": "34bac836-2b5d-4ea5-aeaf-a7e999466aa5",
53 "prevId": "00000000-0000-0000-0000-000000000000",
4+ "version": "7",
5+ "dialect": "postgresql",
66 "tables": {
7- "messages": {
7+ "public.messages": {
88 "name": "messages",
9+ "schema": "",
910 "columns": {
1011 "id": {
1112 "name": "id",
12- "type": "integer",
13+ "type": "serial",
1314 "primaryKey": true,
14- "notNull": true,
15- "autoincrement": true
15+ "notNull": true
1616 },
1717 "thread_id": {
1818 "name": "thread_id",
1919 "type": "integer",
2020 "primaryKey": false,
21- "notNull": true,
22- "autoincrement": false
21+ "notNull": true
2322 },
2423 "role": {
2524 "name": "role",
2625 "type": "text",
2726 "primaryKey": false,
28- "notNull": true,
29- "autoincrement": false
27+ "notNull": true
3028 },
3129 "content": {
3230 "name": "content",
3331 "type": "text",
3432 "primaryKey": false,
35- "notNull": true,
36- "autoincrement": false
33+ "notNull": true
3734 },
3835 "created_at": {
3936 "name": "created_at",
40- "type": "integer",
37+ "type": "timestamp with time zone",
4138 "primaryKey": false,
4239 "notNull": true,
43- "autoincrement": false
40+ "default": "now()"
41+ },
42+ "generation_time_ms": {
43+ "name": "generation_time_ms",
44+ "type": "integer",
45+ "primaryKey": false,
46+ "notNull": false
47+ },
48+ "tool_calls": {
49+ "name": "tool_calls",
50+ "type": "text",
51+ "primaryKey": false,
52+ "notNull": false
4453 }
4554 },
4655 "indexes": {},
@@ -61,55 +70,59 @@
6170 },
6271 "compositePrimaryKeys": {},
6372 "uniqueConstraints": {},
64- "checkConstraints": {}
73+ "policies": {},
74+ "checkConstraints": {},
75+ "isRLSEnabled": false
6576 },
66- "threads": {
77+ "public.threads": {
6778 "name": "threads",
79+ "schema": "",
6880 "columns": {
6981 "id": {
7082 "name": "id",
71- "type": "integer",
83+ "type": "serial",
7284 "primaryKey": true,
73- "notNull": true,
74- "autoincrement": true
85+ "notNull": true
7586 },
7687 "title": {
7788 "name": "title",
7889 "type": "text",
7990 "primaryKey": false,
80- "notNull": false,
81- "autoincrement": false
91+ "notNull": false
8292 },
8393 "created_at": {
8494 "name": "created_at",
85- "type": "integer",
95+ "type": "timestamp with time zone",
8696 "primaryKey": false,
8797 "notNull": true,
88- "autoincrement": false
98+ "default": "now()"
8999 },
90100 "updated_at": {
91101 "name": "updated_at",
92- "type": "integer",
102+ "type": "timestamp with time zone",
93103 "primaryKey": false,
94104 "notNull": true,
95- "autoincrement": false
105+ "default": "now()"
96106 }
97107 },
98108 "indexes": {},
99109 "foreignKeys": {},
100110 "compositePrimaryKeys": {},
101111 "uniqueConstraints": {},
102- "checkConstraints": {}
112+ "policies": {},
113+ "checkConstraints": {},
114+ "isRLSEnabled": false
103115 }
104116 },
105- "views": {},
106117 "enums": {},
118+ "schemas": {},
119+ "sequences": {},
120+ "roles": {},
121+ "policies": {},
122+ "views": {},
107123 "_meta": {
124+ "columns": {},
108125 "schemas": {},
109- "tables": {},
110- "columns": {}
111- },
112- "internal": {
113- "indexes": {}
126+ "tables": {}
114127 }
115128 }
drizzle/meta/0001_snapshot.json+0−122
@@ -1,122 +0,0 @@
1-{
2- "version": "6",
3- "dialect": "sqlite",
4- "id": "8ba81961-1ce9-4e1d-b4b2-5559d2f2de11",
5- "prevId": "f2f09444-b0be-4fd4-bc43-aeb9a6479eab",
6- "tables": {
7- "messages": {
8- "name": "messages",
9- "columns": {
10- "id": {
11- "name": "id",
12- "type": "integer",
13- "primaryKey": true,
14- "notNull": true,
15- "autoincrement": true
16- },
17- "thread_id": {
18- "name": "thread_id",
19- "type": "integer",
20- "primaryKey": false,
21- "notNull": true,
22- "autoincrement": false
23- },
24- "role": {
25- "name": "role",
26- "type": "text",
27- "primaryKey": false,
28- "notNull": true,
29- "autoincrement": false
30- },
31- "content": {
32- "name": "content",
33- "type": "text",
34- "primaryKey": false,
35- "notNull": true,
36- "autoincrement": false
37- },
38- "created_at": {
39- "name": "created_at",
40- "type": "integer",
41- "primaryKey": false,
42- "notNull": true,
43- "autoincrement": false
44- },
45- "generation_time_ms": {
46- "name": "generation_time_ms",
47- "type": "integer",
48- "primaryKey": false,
49- "notNull": false,
50- "autoincrement": false
51- }
52- },
53- "indexes": {},
54- "foreignKeys": {
55- "messages_thread_id_threads_id_fk": {
56- "name": "messages_thread_id_threads_id_fk",
57- "tableFrom": "messages",
58- "tableTo": "threads",
59- "columnsFrom": [
60- "thread_id"
61- ],
62- "columnsTo": [
63- "id"
64- ],
65- "onDelete": "cascade",
66- "onUpdate": "no action"
67- }
68- },
69- "compositePrimaryKeys": {},
70- "uniqueConstraints": {},
71- "checkConstraints": {}
72- },
73- "threads": {
74- "name": "threads",
75- "columns": {
76- "id": {
77- "name": "id",
78- "type": "integer",
79- "primaryKey": true,
80- "notNull": true,
81- "autoincrement": true
82- },
83- "title": {
84- "name": "title",
85- "type": "text",
86- "primaryKey": false,
87- "notNull": false,
88- "autoincrement": false
89- },
90- "created_at": {
91- "name": "created_at",
92- "type": "integer",
93- "primaryKey": false,
94- "notNull": true,
95- "autoincrement": false
96- },
97- "updated_at": {
98- "name": "updated_at",
99- "type": "integer",
100- "primaryKey": false,
101- "notNull": true,
102- "autoincrement": false
103- }
104- },
105- "indexes": {},
106- "foreignKeys": {},
107- "compositePrimaryKeys": {},
108- "uniqueConstraints": {},
109- "checkConstraints": {}
110- }
111- },
112- "views": {},
113- "enums": {},
114- "_meta": {
115- "schemas": {},
116- "tables": {},
117- "columns": {}
118- },
119- "internal": {
120- "indexes": {}
121- }
122-}
drizzle/meta/0002_snapshot.json+0−129
@@ -1,129 +0,0 @@
1-{
2- "version": "6",
3- "dialect": "sqlite",
4- "id": "58b9a40a-76cd-4efa-8945-4bce2b8a1e2e",
5- "prevId": "8ba81961-1ce9-4e1d-b4b2-5559d2f2de11",
6- "tables": {
7- "messages": {
8- "name": "messages",
9- "columns": {
10- "id": {
11- "name": "id",
12- "type": "integer",
13- "primaryKey": true,
14- "notNull": true,
15- "autoincrement": true
16- },
17- "thread_id": {
18- "name": "thread_id",
19- "type": "integer",
20- "primaryKey": false,
21- "notNull": true,
22- "autoincrement": false
23- },
24- "role": {
25- "name": "role",
26- "type": "text",
27- "primaryKey": false,
28- "notNull": true,
29- "autoincrement": false
30- },
31- "content": {
32- "name": "content",
33- "type": "text",
34- "primaryKey": false,
35- "notNull": true,
36- "autoincrement": false
37- },
38- "created_at": {
39- "name": "created_at",
40- "type": "integer",
41- "primaryKey": false,
42- "notNull": true,
43- "autoincrement": false
44- },
45- "generation_time_ms": {
46- "name": "generation_time_ms",
47- "type": "integer",
48- "primaryKey": false,
49- "notNull": false,
50- "autoincrement": false
51- },
52- "tool_calls": {
53- "name": "tool_calls",
54- "type": "text",
55- "primaryKey": false,
56- "notNull": false,
57- "autoincrement": false
58- }
59- },
60- "indexes": {},
61- "foreignKeys": {
62- "messages_thread_id_threads_id_fk": {
63- "name": "messages_thread_id_threads_id_fk",
64- "tableFrom": "messages",
65- "tableTo": "threads",
66- "columnsFrom": [
67- "thread_id"
68- ],
69- "columnsTo": [
70- "id"
71- ],
72- "onDelete": "cascade",
73- "onUpdate": "no action"
74- }
75- },
76- "compositePrimaryKeys": {},
77- "uniqueConstraints": {},
78- "checkConstraints": {}
79- },
80- "threads": {
81- "name": "threads",
82- "columns": {
83- "id": {
84- "name": "id",
85- "type": "integer",
86- "primaryKey": true,
87- "notNull": true,
88- "autoincrement": true
89- },
90- "title": {
91- "name": "title",
92- "type": "text",
93- "primaryKey": false,
94- "notNull": false,
95- "autoincrement": false
96- },
97- "created_at": {
98- "name": "created_at",
99- "type": "integer",
100- "primaryKey": false,
101- "notNull": true,
102- "autoincrement": false
103- },
104- "updated_at": {
105- "name": "updated_at",
106- "type": "integer",
107- "primaryKey": false,
108- "notNull": true,
109- "autoincrement": false
110- }
111- },
112- "indexes": {},
113- "foreignKeys": {},
114- "compositePrimaryKeys": {},
115- "uniqueConstraints": {},
116- "checkConstraints": {}
117- }
118- },
119- "views": {},
120- "enums": {},
121- "_meta": {
122- "schemas": {},
123- "tables": {},
124- "columns": {}
125- },
126- "internal": {
127- "indexes": {}
128- }
129-}
drizzle/meta/_journal.json+4−18
@@ -1,26 +1,12 @@
11 {
22 "version": "7",
3- "dialect": "sqlite",
3+ "dialect": "postgresql",
44 "entries": [
55 {
66 "idx": 0,
7- "version": "6",
8- "when": 1765904176875,
9- "tag": "0000_rich_betty_ross",
10- "breakpoints": true
11- },
12- {
13- "idx": 1,
14- "version": "6",
15- "when": 1765910805241,
16- "tag": "0001_worthless_wolf_cub",
17- "breakpoints": true
18- },
19- {
20- "idx": 2,
21- "version": "6",
22- "when": 1765931091454,
23- "tag": "0002_cynical_thunderbolts",
7+ "version": "7",
8+ "when": 1766005179126,
9+ "tag": "0000_burly_pixie",
2410 "breakpoints": true
2511 }
2612 ]
package-lock.json+17−363
@@ -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.
package.json+1−2
Cut short: this commit's diff is over 1000 lines.
scripts/start-docker.sh+36−4
Cut short: this commit's diff is over 1000 lines.
src/lib/db/index.ts+14−17
Cut short: this commit's diff is over 1000 lines.
src/lib/db/schema.ts+11−11
Cut short: this commit's diff is over 1000 lines.