Writing by Niraj Jha

Notes from building AI products that have to keep working

Architecture decisions and the trade-offs behind them, retrieval that survives production, and the things I got wrong first. Written from systems that shipped, not from tutorials.

About meRSS
Posts
9
Total reads
91
Likes
4
Subscribers
5
Tags

9 posts

  • Frontend
    /8 min/4

    The like button that lied to me on purpose

    I turned the network off, liked my own post, and watched the count go up anyway. The lie was deliberate and correct here. Where it stops being correct is the whole question.

    • Next.js
    • Performance
    • Engineering
  • FeaturedAI
    /13 min/9

    The same question, four thousand ways

    A support bot answered ninety questions four thousand times and paid full price for every one. Exact-match caching hit two percent. Here is what actually works.

    • AI
    • Engineering
    • Performance
  • Engineering
    /10 min/5

    The login that allocated 32 MB

    Better Auth hashes passwords with scrypt, which wants 32 MB of memory per login. On Cloudflare Workers that is a problem. Replacing it was the easy part.

    • Security
    • Engineering
  • Next.js
    /6 min/1

    Why your loading.tsx never showed up

    The skeleton took an afternoon and nobody ever saw it. The file was in the right folder with the right name, and four separate things stopped it rendering.

    • Next.js
    • Performance
  • Next.js
    /6 min/2

    The pending flag that lags one frame behind the click

    The bug report was one line: it deletes twice sometimes. The cause was a button that looked dead for a moment, and the fix we wrote was React's own flag, badly.

    • Next.js
    • Performance
    • Interviews
  • Next.js
    /6 min/2

    Three layers people call a server action

    A two line pull request nearly went through on my phone. It was the third delete button that month, written the third different way, and one of them was wide open.

    • Next.js
    • Interviews
  • FeaturedNext.js
    /7 min/8

    The prefetch that made the list page slower

    A three line accessibility fix made navigation instant and the orders list slow. The obvious next move made it four times worse, and the reason is one default.

    • Next.js
    • Performance
    • Interviews
  • FeaturedEngineering
    /10 min/38/1

    Hello, I'm Niraj

    I build AI products end to end at Creatr: email pipelines on Gmail webhooks, M365 integrations, retrieval that survives production. What I have shipped, and four things I got wrong first.

    • Introduction
    • Engineering
    • AI

Open source

Want to learn this by doing it?

I run an open-source project like a real engineering team: a board, cycles, proper code review and written feedback. You join as a team member, not as a student.

How it works