Notes from the work.
Write-ups on things I've built and debugged in production — streaming AI responses, retrieval, auth, caching and deployment. Some posts live here, others on Medium.
- 9 min read
B-Tree কীভাবে কাজ করে: Binary Tree থেকে Database Index পর্যন্ত
B-Tree কেন একটা node-এ অনেক key রাখে, n key কেন n+1 child বানায়, tree কীভাবে নিজে balanced থাকে, আর database index-এর জন্য B-Tree ও B+ Tree কেন সবচেয়ে উপযুক্ত।
- 15 min read
PostgreSQL Internals, Part 5: Transaction, Isolation আর WAL
Transaction আর ACID কী, isolation level অনুযায়ী snapshot কীভাবে বদলায়, আর WAL ও checkpoint মিলে PostgreSQL কীভাবে crash-এর পরেও committed data বাঁচিয়ে রাখে, সেটা এখানে বুঝব।
- 13 min read
PostgreSQL Internals, Part 4: Architecture আর Query Lifecycle
একটা connection খোলা থেকে result পাওয়া পর্যন্ত PostgreSQL-এর ভেতরে কোন process কী করে, shared buffers আর dirty page কী, আর একটা query কোন কোন ধাপ পেরিয়ে চলে, সেটা এই পর্বে বুঝব।
- 13 min read
PostgreSQL Internals, Part 3: Index কীভাবে কাজ করে
B-Tree index ভেতরে কীভাবে সাজানো থাকে, Index Scan, Index Only Scan আর Bitmap Scan কখন কাজে লাগে, আর composite index-এ column order কেন এত গুরুত্বপূর্ণ।
- 13 min read
PostgreSQL Internals, Part 2: MVCC আর VACUUM
UPDATE কেন পুরোনো row overwrite করে না, xmin/xmax আর snapshot দিয়ে কোন version visible হয়, আর dead tuple, VACUUM, autovacuum ও HOT update কীভাবে কাজ করে, সেটা এই পর্বে বোঝা যাবে।
- 12 min read
PostgreSQL Internals, Part 1: Heap, Page আর Tuple
PostgreSQL একটা table-কে disk-এ আসলে কীভাবে রাখে, heap, 8 KB page, tuple, line pointer, CTID আর TOAST কী, এবং index ছাড়া query কেন সব page পড়ে, সেটা বুঝব।
- 8 min read
How NestJS Actually Works: Dependency Injection Explained with a Pizza
Providers, modules, IoC and the NestJS container stop feeling like magic once you see them as a pizza shop — who makes what, who needs what, and who connects it all.
- 9 min read
Refresh Tokens in Next.js, Part 3: Rotation and Theft Detection on the Backend
How a NestJS API issues refresh tokens, rotates them on every use, catches stolen ones, and ends sessions instantly — with Prisma and MongoDB.
- 9 min read
Refresh Tokens in Next.js, Part 2: Managing Tokens on the Frontend
How a Next.js app keeps tokens in HttpOnly cookies, refreshes them silently in the browser, and handles expiry on server-rendered pages and Server Actions.
- 7 min read
Before You Change a Live System, Write Down What It Does Today
Spec-driven development usually starts with a new feature. For an existing product, start with a baseline spec — an honest record of current behaviour, including the parts that look wrong.
- 5 min read
Spec-Driven Development: Write the Spec Before the Prompt
AI coding agents are fast but drift without direction. Writing a short spec first turns them from guessers into implementers — here's the workflow and a template.
- 9 min read
Refresh Tokens in Next.js, Part 1: The Problem
Why the usual token setups are unsafe, and why the normal way of refreshing tokens breaks in Next.js — who can set cookies, and the race conditions that log users out.
- 4 min read
A Practical RAG Setup with MongoDB Atlas Vector Search
Chunking, embeddings, the vector index and the $vectorSearch query — building retrieval-augmented answers without adding a separate vector database.
- 4 min read
Streaming AI Chat Responses with Server-Sent Events
How to stream LLM output token by token from FastAPI to a Next.js client — and the proxy, buffering and disconnect details that tutorials skip.
(opens on Medium)6 min readMedium ↗HowHow to Deploy Next.js on Cloudflare: Complete Guide
So you’ve read about the philosophy, understood the architecture, and marveled at the possibilities of edge computing. But there’s a practical question screaming to be…
(opens on Medium)2 min readMedium ↗Next.js Isn’t Unpredictable — You Just Don’t Understand Its Cache
I’ve been there too.