Tutorials
Learn to build SaaS.
Practical tutorials on building modern web applications.
11 min read
Next.js Middleware: What It's For, What It Isn't, and How to Ship It Correctly
Master what Next.js middleware is, what it isn't, and when to use it. Learn the architecture judgment that keeps middleware fast and maintainable.
nextjsperformancesecurity
Read tutorial
9 min read
FastAPI Background Tasks for LLM Jobs: A Complete Polling Pattern with Next.js
Move long LLM calls out of request path with FastAPI BackgroundTasks and job polling. Return 202 with job ID, let clients poll status until done.
fastapiainextjs
Read tutorial
11 min read
Docker Bake: A Practical Guide to Declarative, Parallel Docker Builds
Replace scattered docker build commands with a single bake.hcl config. Run multi-service builds in parallel with shared cache and zero copy-paste drift.
dockerautomation
Read tutorial
13 min read
Managing Cost and Token Budgets for LLM APIs in Production: Caching, Batching, and Fallback Models
Treat LLM spend like database load. Build routing, caching, and cost controls into your request path from day one—not as an afterthought.
aiperformance
Read tutorial
10 min read
Setting Up a CLAUDE.md File on a Real Full-Stack Repo
Set up Claude Code context files that persist across sessions. Load architecture decisions, conventions, and polyglot rules once—then let AI assistants reference them automatically.
aiautomationtypescript
Read tutorial
12 min read
Deploying FastAPI and Next.js to AWS App Runner vs. ECS Fargate: When Managed Wins
Senior engineer's honest breakdown: App Runner for solopreneurs and small teams, ECS Fargate when you need control. Real tradeoffs, no hype.
awsfastapinextjs
Read tutorial
14 min read
The N+1 Query Problem: How to Spot It and Fix It in Django and SQLAlchemy
How the N+1 query problem silently tanks production performance, why it's invisible in dev, and concrete fixes for Django and SQLAlchemy.
djangoperformancepostgres
Read tutorial
13 min read
AWS Cost Optimization for a Dockerised Stack: Right-Sizing ECS, Fargate Spot, and Egress Traps
Right-size ECS, use Fargate Spot, avoid egress traps. Production checklist from 25+ years of SaaS infrastructure decisions.
awsdockerperformance
Read tutorial
10 min read
WebSockets in FastAPI and Next.js: Scaling Real-Time Connections Behind a Load Balancer
Build production WebSocket architectures that survive load balancers. Protocol fundamentals, connection management, authentication, and horizontal scaling without message loss.
fastapinextjsperformance
Read tutorial