- Replace pdf2pic/GraphicsMagick with pdfjs-dist + @napi-rs/canvas for Vercel-compatible PDF rasterization - Replace MinIO with Supabase Storage (S3-compatible); rename minio.ts to storage.ts and update all imports - Replace in-memory job queue with Upstash QStash; upload route now persists files to storage before enqueuing, /api/jobs/process handles the QStash callback - Convert email watcher from persistent IMAP connection to stateless scanInbox() polled by Vercel Cron every 2 minutes - Add FTP watcher (basic-ftp) with cron polling for scanner integration via Dreamhost FTP drop directory - Add FTP config fields to AppSettings schema - Remove folder watcher (chokidar), standalone output, Docker-only code - Update next.config.ts, middleware, instrumentation for serverless - Add vercel.json with cron schedules for email and FTP polling - Add migration scripts for database (pg_dump/restore) and storage (S3-to-S3 copy) with verification Made-with: Cursor
40 lines
1.8 KiB
Text
40 lines
1.8 KiB
Text
# ─── Database (Supabase pooled connection) ────────────────────
|
|
DATABASE_URL="postgresql://postgres.<ref>:<password>@aws-0-us-east-1.pooler.supabase.com:6543/postgres"
|
|
|
|
# ─── Object Storage (Supabase Storage, S3-compatible) ─────────
|
|
STORAGE_ENDPOINT="https://<ref>.supabase.co/storage/v1/s3"
|
|
STORAGE_REGION="us-east-1"
|
|
STORAGE_ACCESS_KEY=""
|
|
STORAGE_SECRET_KEY=""
|
|
STORAGE_BUCKET="echos-ocr"
|
|
|
|
# ─── Upstash QStash (job queue) ───────────────────────────────
|
|
QSTASH_TOKEN=""
|
|
QSTASH_CURRENT_SIGNING_KEY=""
|
|
QSTASH_NEXT_SIGNING_KEY=""
|
|
|
|
# ─── Vercel AI Gateway ────────────────────────────────────────
|
|
AI_GATEWAY_API_KEY=""
|
|
|
|
# ─── Auth.js (required — generate with: npx auth secret) ─────
|
|
AUTH_SECRET=""
|
|
AUTH_URL="https://echoocr.yourdomain.com"
|
|
|
|
# ─── OIDC SSO (optional) ──────────────────────────────────────
|
|
AUTHENTIK_ISSUER=""
|
|
AUTHENTIK_CLIENT_ID=""
|
|
AUTHENTIK_CLIENT_SECRET=""
|
|
|
|
# ─── SMTP for outbound email ──────────────────────────────────
|
|
SMTP_HOST="smtp.dreamhost.com"
|
|
SMTP_PORT="587"
|
|
SMTP_USER=""
|
|
SMTP_PASS=""
|
|
SMTP_FROM=""
|
|
|
|
# ─── Vercel Cron Secret ────────────────────────────────────────
|
|
# Vercel auto-sets this on Pro. Used to authenticate cron job requests.
|
|
CRON_SECRET=""
|
|
|
|
# ─── Environment indicator ────────────────────────────────────
|
|
NEXT_PUBLIC_ENV=""
|