Commit Graph

5 Commits

Author SHA1 Message Date
CTO
79191c3810 fix: replace pdf-parse with direct pdfjs-dist to fix DOMMatrix error in production
All checks were successful
Deploy to VPS / deploy (push) Successful in 1m10s
pdf-parse v2 depends on @napi-rs/canvas (native module) which fails in
Next.js standalone Docker builds — native binaries aren't traced/copied
to the standalone output, causing DOMMatrix is not defined at runtime.

Replaced pdf-parse entirely with pdfjs-dist legacy build which works
natively in Node.js without canvas or DOM API dependencies:

- New src/lib/pdf.ts: extractTextFromPdf() using pdfjs-dist/legacy/build
- Worker file explicitly imported so Next.js file tracer includes it
- Updated all call sites: documents, norms/parse, contracts
- Removed pdf-parse from dependencies, added pdfjs-dist directly
- Changed serverExternalPackages from pdf-parse to pdfjs-dist

Verified: build succeeds, both pdf.mjs and pdf.worker.mjs present in
.next/standalone, text extraction works in standalone context.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-10 21:19:20 +00:00
CTO (LegalAI)
6f80cadbd4 feat: add build hash to sidebar footer and Gitea CI/CD deploy workflow
Some checks failed
Deploy to VPS / deploy (push) Has been cancelled
- Inject git commit short hash at build time via NEXT_PUBLIC_BUILD_HASH
- Display build hash in sidebar footer for version tracking
- Add Gitea Actions workflow to auto-deploy on push to master (SSH → pull → rebuild)

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-09 20:58:50 +00:00
CTO (LegalAI)
09b0022b02 fix: include drizzle-orm and pg in serverExternalPackages for standalone migration
The entrypoint.sh migration script (migrate.mjs) imports
drizzle-orm/node-postgres/migrator which is never imported by app code.
Next.js standalone trace therefore omits it from node_modules, causing
the container to crash on startup before server.js runs.

Adding drizzle-orm and pg to serverExternalPackages ensures the full
packages are copied into the standalone output, fixing the migration
crash.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-09 14:41:18 +00:00
CTO (LegalAI)
34047739cf feat: add PDF upload support to Fliesstext-Import
The import page now accepts PDF files in addition to TXT.
Backend uses pdf-parse to extract text from uploaded PDFs
before sending to AI for paragraph parsing.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-09 11:52:58 +00:00
CTO (LegalAI)
1d61b2ad8a Initial project structure: Next.js 15 + TypeScript + Drizzle ORM
- Next.js 15 with App Router, TypeScript, Tailwind CSS
- Directory structure per LegalAI architecture plan
- Docker Compose setup (PostgreSQL 16, Meilisearch, App)
- Drizzle ORM with base schema (tenants, users, norms, decisions)
- AI abstraction layer structure (Vercel AI SDK)
- Normen-Engine with Quellenrang hierarchy
- Search abstraction layer
- Auth placeholder (NextAuth.js)

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-08 21:07:22 +00:00