feat: use db for rag

This commit is contained in:
2025-08-07 14:14:46 -07:00
parent 4971695d2a
commit 24d37dcd16
11 changed files with 145 additions and 50 deletions
+2 -1
View File
@@ -9,7 +9,8 @@
"dev": "NODE_ENV=dev op run --env-file=./dev.env -- tsx watch ./src/index.ts",
"build": "tsc",
"start": "op run --env-file=./prod.env -- node ./prod/index.js",
"test": "echo 'No tests yet' && exit 0"
"test": "echo 'No tests yet' && exit 0",
"db": "prisma generate"
},
"keywords": [],
"author": "",
+19 -9
View File
@@ -2,18 +2,28 @@
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
provider = "prisma-client-js"
}
datasource db {
provider = "mongodb"
url = env("MONGO_URI")
provider = "mongodb"
url = env("MONGO_URI")
}
model Announcements {
id String @id @default(auto()) @map("_id") @db.ObjectId
title String
content String
type String
createdAt DateTime @default(now()) @unique
}
id String @id @default(auto()) @map("_id") @db.ObjectId
title String
content String
type String
createdAt DateTime @unique @default(now())
}
model Documentation {
id String @id @default(auto()) @map("_id") @db.ObjectId
title String
pageTitle String
url String
content String
pageId String @unique
file String
}