Backend Building Blocks
All AI coding building blocks tagged with Backend. Each one comes with a concept explainer, decision framework, common mistakes, and ready-to-use AI prompts.
Caching
A popular product page can get loaded 10,000 times in an hour, but the data behind it changes maybe once …
Database Indexing
Your app worked great with 100 users. Now you have 10,000, and every page takes forever to load. Your database …
Modular Architecture
When one code file hits 2,000 lines, AI coding assistants start guessing, and their suggestions drift further from what you …
Middleware Basics
Picture a toll booth on a highway: every car stops, pays, and only then continues. That's middleware, code that every …
Webhooks
Polling asks "anything new?" a thousand times. Webhooks send one message the instant something happens. Same outcome, a fraction of …
Smart Abstraction
Imagine a restaurant kitchen where the chef needs tomatoes. The main supplier is out? Call the backup supplier. Backup unavailable? …
WebSockets
Imagine calling a restaurant every 3 minutes to ask "is my table ready yet?" Each time, the answer is "not …
Input Validation
Every form field a user touches is a doorway into your app, and most users will type something you didn't …
CSRF Protection
A user can be logged into your site in one tab and visit a trap page in another. The trap …
Race Conditions
Two users click "Redeem" on the same coupon at the same millisecond. Your app checks if it's available for both, …
Web Scraping
You need prices from 50 online stores. Copying each one by hand takes hours, and the first prices are already …