Tech Stack
Pinned versions live in package.json / .node-version. Summary, not source of truth — check those files when versions matter.
| Layer | Choice | |---|---| | Runtime | Node.js 24.x | | Framework | Next.js 16.3.4 (App Router, Turbopack build, output: standalone) | | UI | React 19.2.4, Tailwind CSS 4, shadcn/ui + Radix UI | | Language | TypeScript 5, strict | | Database | PostgreSQL + pgvector | | ORM | Prisma 7.8.0 with @prisma/adapter-pg | | Queue / cache | Redis (self-hosted) + BullMQ; Upstash-compatible fallback | | Storage | S3-compatible (MinIO preferred; Cloudflare R2 supported) | | Auth | jose (JWT) + bcryptjs, HTTP-only refresh rotation | | Payments | Stripe (subscriptions, checkout, webhooks) | | AI | Vercel AI SDK + OpenAI + Anthropic; pgvector RAG (DocumentChunk) | | Voice | Deepgram (STT) + ElevenLabs (TTS), Web Speech fallback | | Email / SMS | Usermails / Twilio | | Realtime | Socket.io + SSE; Yjs for collaboration | | OCR | AWS Textract primary; optional local deps via turbopackOptional | | Monitoring | Sentry + PostHog | | Testing | Vitest 4 + Testing Library + Playwright | | Mobile | PWA + optional Capacitor bridge | | i18n | React context locale provider (en, es, pt, fr, de, zh, ja, ko) | | Package manager | npm (package-lock.json) |
Load-bearing constraints
- Turbopack only.
src/lib/ocr/processor.tsimports optional packages - Build heap ≥ ~10 GB (
NODE_OPTIONS=--max-old-space-size=12288in the - OCR stubs in tests:
vitest.config.tsaliasespdf-parseand
guarded by turbopackOptional comments. Building with --webpack breaks every route that transitively imports it. Never add --webpack.
build script): ~885 pages / 1000+ API routes peak around 8 GB.
tesseract.js to lightweight stubs; production uses the real path.