How we cut PostgreSQL API response times by 40% while handling 10,000+ daily requests
When building a startup MVP, it's tempting to ship unindexed queries and worry about scale later. On VieroMind (a privacy-first mental health platform across Next.js web and React Native), we hit 10,000+ daily API requests early—and slow endpoints immediately hurt mobile UX.
3 practical changes that cut response time by 40%:
1. Replaced N+1 lookups with targeted composite indexes on user + timestamp columns.
2. Switched heavy journaling payloads to selective field projections instead of full row fetches.
3. Shared one clean Node.js + Express REST layer across both Next.js web and React Native mobile so auth, caching, and validation stay in sync.
If you're a startup founder building a Next.js + PostgreSQL SaaS MVP or adding a React Native app to your backend, check out my fixed-scope packages on Contra: https://contra.com/umerejazdev/services
Composite indexes on user + timestamp are a great fit for journal-style data. Did the N+1 part also need a join or one batched query? Indexes make each lookup fast, but the round trips still add up. The field projections are a nice privacy win too: list screens don't have to carry private journal text at all.
I wrote 1,300+ unit tests for a learning app nobody asked me to build.
Loo is my own project, live at playloo.app. Five-minute lessons, streaks and weekly leagues, on Next.js 16 and Supabase.
Answer keys never reach the browser in graded steps. Every answer is checked on the server, and XP, hearts and leagues change in one server transaction.
Every progress table has row level security, so each learner reads only their own rows.
I build it the way I want a client's app built. It is also where I try things before I recommend them to anyone.
Every second client call lately starts the same way:
"Can we add AI to the website?"
I ask, "What for?"
And that's usually where it goes quiet.
Some clients have a real answer. Customers asking the same 20 questions all day. Leads slipping through because nobody replied in time. Staff doing the same manual entry every morning. That's a proper problem, and AI integration can fix it with a custom chatbot, automated lead capture, or smarter customer support.
But a lot of the time, the answer is basically "everyone else has it."
An AI feature nobody needed doesn't make a website modern. It makes it slower, costlier to maintain, and one more thing that can break.
So before I build anything, I ask one question:
What problem is this solving?
If there's a clear answer, I'll build it properly. If not, I'll tell you straight, because a faster Next.js site, a cleaner checkout, or a better lead-management dashboard might do more for your business than any AI feature.
I'm a full stack developer (React, Next.js, Node.js, PostgreSQL, MongoDB) building web applications, business automation, and AI-powered tools that are actually worth the money.
Thinking about adding AI to your website or product? Tell me what you want it to do, and I'll tell you honestly whether it's worth building..