
Why my Next.js dashboard was always showing stale data — and the one-line fix
The timestamp was updating. The AI recommendations kept coming in. Everything looked alive. But the sensor values hadn't moved in twenty minutes. That's the kind of bug that gets inside your head. Not because it's complicated — but because it makes no sense. Half the app was working perfectly, which meant the problem wasn't obvious. It was hiding somewhere in the middle, watching me look in all the wrong places. This is SensorWatch AI — an industrial sensor monitoring dashboard built with Next.js 14, TypeScript, PostgreSQL, and an LLM integration via OpenRouter. Three simulated industrial sensors, real-time anomaly detection, and an AI pipeline that generates maintenance recommendations in natural language. A system that, at least on paper, was working fine. Except it wasn't. And I was about to spend the next several hours finding out why. Everything I tried that didn't work My first suspect was the AI. OpenRouter's free tier is slow. Sometimes painfully slow. My theory: the LLM call w
Continue reading on Dev.to Webdev
Opens in a new tab




