Replace @vercel/postgres, Blob, and Upstash with lib/sql.js, MinIO object
storage, and CT 102 Redis rate limits. Add Dockerfile for Dokploy deploy,
homelab runbooks, Neon data-copy helper, and point CI smoke/visual at the
homelab URL instead of Vercel previews.
Co-authored-by: Cursor <cursoragent@cursor.com>
Expose POST /api/admin/sync-catalog for authenticated admins (import rate limit, 300s timeout) and wire a Run catalog sync control on /admin/card-import.
Co-authored-by: Cursor <cursoragent@cursor.com>
🔧 Configuration Changes:
- Remove specific runtime version from vercel.json
- Remove buildCommand that might be causing conflicts
- Let Vercel use default Node.js runtime settings
🧪 Simple Test Endpoint:
- Add /api/simple with minimal dependencies
- Use traditional Vercel function signature (req, res)
- No imports or complex operations to isolate the issue
This should help identify if the problem is with our function configuration, imports, or Vercel setup.
🔧 Routing Fix:
- Remove redundant API rewrite rule that was causing conflicts
- Use negative lookahead regex to exclude API routes from frontend rewrites
- Only rewrite non-API, non-static routes to index.html
- This should resolve API endpoints returning HTML instead of JSON
🚀 Expected Result:
- /api/* routes will now properly reach Vercel functions
- Frontend routes will still work correctly
- Static assets remain unaffected
- Change JSON import to use require() to avoid module loading issues
- Add api/tsconfig.json with CommonJS module configuration
- Update Vercel Node.js runtime to @vercel/node@3.2.0
- Add buildCommand to vercel.json for proper compilation
- Fix 'Cannot use import statement outside a module' error