WebFrontend engineering
Next.js, React and TypeScript in production. These notes cover caching, server components and actions, performance, and the patterns we keep.
Start here
Web
WebWhy is my website slow? The 6 causes and what fixes each
Only 48% of mobile sites pass Core Web Vitals. The six causes of a slow website, how to find yours in PageSpeed Insights, and what fixes each one.
WebNext.js 16 caching explained: use cache, cacheLife and updateTag
In Next.js 16 nothing is cached until you write 'use cache'. How cacheLife's seven profiles, cacheTag and updateTag fit together, and where fetch stands now.
Webnpm dependency sprawl: the 4 costs on enterprise frontends
Sonatype logged 454,600 new malicious packages in 2025 and 99.8% of Q4 malware came from npm. What dependency sprawl costs, and the five controls we run.
WebReact Server Components in production: 6 pitfalls to avoid in 2026
45% of React developers have shipped Server Components, yet they rank third-most-disliked in the State of React 2025. Six failure modes explain the gap.
WebNext.js Agent DevTools: the AI debugging setup in 2026
Next.js 16.3 gives coding agents terminal access to build errors, routes and the React tree. The MCP and agent-browser setup, in five steps.
WebNext.js Server Actions in production: patterns we use and avoid
Every Server Action you export is a public POST endpoint with no built-in auth. Here are the Next.js 16 patterns we ship and the ones we refuse.
WebTypeScript 7's Go compiler: what the 10x speedup changes
TypeScript 7 rewrites tsc in Go and type-checks the 1.5M-line VS Code repo in 7.5s instead of 78s. Here is what the 10x speedup changes for a dev team.
WebPartial Prerendering is stable in Next.js 16: how to structure routes
Next.js 16 makes Partial Prerendering stable via cacheComponents: a static shell from the CDN edge, dynamic parts streamed in the same response.
Webnpm dependency sprawl: the real cost and how to cut it in 2026
A fresh Next.js app pulls 1,000+ packages before any code. Here is what npm dependency sprawl costs in build time, bundle, and security, and how to cut it.
AIAnthropic API in Next.js: streaming, caching, and cost control
Wire Claude into a Next.js app: a server-side route handler, SSE streaming, a cached prompt prefix at 10% of input cost, and retries that survive a 429.
WebNext.js i18n without a library: the App Router pattern we ship
Next.js App Router ships no built-in i18n. We run three locales on native routing with zero i18n dependencies. Here is the exact production pattern.
WebTanStack in 2026: Query, Router, Start, and what each one solves
TanStack Query passes 12M weekly downloads. The family now spans routing, tables, forms, and a full-stack framework. What each solves, and when to add it.
WebWebGL vs CSS animation: when to use each (2026)
CSS animates transform and opacity off the main thread for free. WebGL hands you the raw GPU. Here is the line between them, with the bundle and battery costs.
WebWeb font performance: one WOFF2 file, zero layout shift
An unoptimised family adds 500KB and delays readable text. Subset to WOFF2, self-host it, tune the fallback with size-adjust so nothing moves on swap.
Web6 frontend mistakes that tank your Lighthouse score in 2026
Total Blocking Time is 30% of the Lighthouse score, yet most teams fix the wrong metric. The six production mistakes that crater it, and how to fix each.
InfraVercel vs Docker for Next.js: a $600 bill down to $90
A $600 Vercel bill drops to about $90 a month on a managed VPS with Docker. What you give up in edge, scaling and DX, and when the swap pays off.
WebType-safe RPC with Next.js Server Actions: skip the API layer
A Server Action is already an RPC. Here is how to make it type-safe end to end and validated at runtime, with no API route or response type to maintain.
WebWebsite architecture in 2026: SPA homepage, static for the rest
Most marketing sites overengineer every page. We treat the homepage like an app and ship the other 95% as static docs, splitting the build target by intent.
WebCore Web Vitals on Next.js in 2026: how to ship green
Concrete steps to hit Good on LCP under 2.5s, INP under 200ms, and CLS under 0.1 on a Next.js 16 SaaS, plus how to read field data when Lighthouse lies.
WebImmersive web stack in 2026: Lenis, GSAP, and what to skip
Lenis (3 kB), GSAP free since April 2025, ScrollTrigger for scroll math, and native CSS scroll-driven animations. The 2026 stack we ship in production.
WebTypeScript strict mode: the 9 settings we never turn off
strict: true turns on 9 checks, and since TypeScript 6.0 it is the default. What each flag catches in production, plus the 3 flags outside the bundle we add.
WebNext.js development agency vs in-house: when each one wins in 2026
A US senior Next.js hire costs $195,000 fully loaded and takes six weeks to find. Agency rates run $60 to $250 per hour. Here is how each one wins.
WebNext.js Server Actions security: 13 advisories and 2026 fixes
Next.js shipped 13 security advisories in 2026: middleware bypass, cache poisoning, and SSRF. What changed and how to ship Server Actions safely now.
WebWhy we removed Tailwind from production: a CSS-only design system
After years of running Tailwind alongside our own design system, we removed it from production. Here is the architecture that replaced it and what changed.
WebModern CSS 2026: cascade layers, container queries, :has()
Cascade layers end specificity wars, container queries replace component media queries, and :has() ships in every major browser. What to adopt in 2026.
WebWhy we still pick Next.js over Astro for most SaaS in 2026
We have shipped both Next.js and Astro this year. For SaaS specifically, Next.js stays our default. Here is the honest tradeoff in 2026.
WebReact Compiler 1.0 directives: use memo and use no memo
React Compiler 1.0 memoizes most components at build time. Where the two directives apply, and where useMemo and useCallback still earn their place.
DesignDesign tokens vs CSS variables vs Tailwind, explained (2026)
Design tokens, CSS variables, and Tailwind sit at three layers: meaning, runtime values, and utility classes. How to pick, and how they stack together.
AINext.js MCP server: mcp-handler, OAuth 2.1, Redis sessions
Mount an MCP server on a live Next.js 16 SaaS with mcp-handler: the dynamic transport route, OAuth 2.1, Redis session state, and 4 failure modes.
WebServer Components vs Client Components: the decision tree we follow
The five-step decision tree we apply on every Next.js 16 project to decide when a component stays server-side and when it needs "use client".
Web