Back to Blog
Behind the Scenes

The Biggest Mistakes I Made Building an AI App

Wrong database, hardcoded secrets, crashing deploys, users finding bugs in 5 minutes. Here's what NOT to do.

D
Daniele Lombardo
3.5.2026
📖 7 min read
#Errori#Startup#Sicurezza#TypeScript#Lezioni

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.

D
Written by Daniele Lombardo
Founder di MAI Team
I'm building this project to make AI truly useful every day.

Ready to Get Started?

Join hundreds of professionals using MAI Team