Add XRayPDF client app with OCR routes
Introduce a new Next.js `client` app for XRayPDF: adds frontend pages (dashboard, upload, layout, Navbar, globals) and API routes for documents (upload, OCR, pixel processing, delete, list). Include Tesseract traineddata (eng.traineddata), update next.config.ts to allow native server packages and remote images, update package.json to add dependencies (canvas, sharp, tesseract.js, pdfjs-dist, multer, uuid), and update Prisma schema. Also add .gitignore entries for user uploads/results and a README describing the project and architecture.
This commit is contained in:
1 parent
50bc2eea74
commit
41186abc57
20 files changed
+2586
-81
No files matched your search
@@ -13,10 +13,29 @@ datasource db {
|
||||
provider = "postgresql"
|
||||
}
|
||||
|
||||
model user{
|
||||
id String @id @default(uuid())
|
||||
email String @unique
|
||||
model user {
|
||||
id String @id @default(uuid())
|
||||
email String @unique
|
||||
name String?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
documents pdfDocument[]
|
||||
}
|
||||
|
||||
model pdfDocument {
|
||||
id String @id @default(uuid())
|
||||
userId String
|
||||
user user @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
originalName String
|
||||
filePath String
|
||||
pixelResultDir String?
|
||||
ocrResultDir String?
|
||||
ocrRan Boolean @default(false)
|
||||
fileSize Int
|
||||
pageCount Int @default(1)
|
||||
pixelPageCount Int @default(0)
|
||||
ocrPageCount Int @default(0)
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
@@index([userId])
|
||||
}
|
||||
Reference in new issue
Block a user