Building an AI app seems simple until you put it in production. Here are the mistakes I made — and that I hope you can avoid.
Mistake 1: SQLite in production on serverless
My first Vercel deploy used SQLite. Locally it worked perfectly. In production, every request created a new database file because serverless functions are stateless.
Mistake 2: JWT_SECRET = "maiteam2026"
Yes, I really did that. The secret for signing JWT tokens was a hardcoded string in the source code. Anyone reading the repo could generate valid tokens for any user.
Mistake 3: ignoreBuildErrors: true
For weeks I had ignoreBuildErrors: true in next.config. When I finally removed it and fixed all 82 TypeScript errors, the app became 10x more stable.