Skip to content

Explore

Every article, note and guide — search, filter by topic and level, or browse by year.

Or read a series

Bundle Analysis and Tree Shaking: What's in Your Bundle and Why

How to read a bundle analyzer in 2026 (next analyze, rollup-plugin-visualizer, source-map-explorer), how tree shaking really works with ESM, sideEffects, barrel files and CommonJS, the usual traps like moment and lodash, duplicate dependencies, polyfills, and bundle budgets in CI with size-limit.

Tooling & workflow7 min

Model Context Protocol in Practice: Building a Production MCP Server in TypeScript

MCP isn't magic, it's a well-designed JSON-RPC protocol. This post explains hosts, clients, servers, primitives and transports as of the 2026-07-28 spec, then builds a read-only TypeScript server over order data: tool design, pagination, testing with the Inspector, OAuth for remote servers, and the security holes you need to close.

Tooling & workflow19 min

Business Process Modeling with BPMN 2.0: From As-Is Diagrams to Running Software

BPMN isn't for decorating project documents; it's for finding where a process wastes time: handoffs, rework loops, waiting. This post covers the notation subset you actually need, common modeling mistakes, a measured as-is/to-be purchase approval example, and the path from model to state machine, workflow engine and user stories.

Learning & career25 min

On-Device AI in the Browser: WebGPU, Web Workers and Chrome's Built-in AI

When running a model on the user's machine makes sense and when it doesn't, how far Chrome's built-in AI has shipped, Transformers.js, ONNX Runtime Web and WebLLM on WebGPU/WASM, running inference in a Web Worker, caching model weights, and UX for the first download.

Frontend & UI9 min

Type-Level TypeScript for API Contracts You Can't Misuse

Conditional types and infer, key remapping, template literal types that turn "/users/:id/posts/:postId" into typed params, a fetch client derived from a route map, typed errors, branded IDs, satisfies and const type parameters, a Zod bridge so the types aren't lies — and when to stop.

Tooling & workflow16 min

Accessible Custom Widgets in React: ARIA Patterns That Actually Work

When native elements run out, ARIA is a contract you have to keep. The accessibility tree and name computation, roving tabindex vs aria-activedescendant, a combobox and tabs built step by step, live regions that really announce, focus on route changes, and how to test it all.

Frontend & UI20 min

Server State Is a Cache, Not State: TanStack Query v5 in Depth

Data from the server isn't yours — you only hold a copy with an expiry date. This post goes deep on TanStack Query v5 through the lens of caching: query key design, staleTime and gcTime, invalidation, optimistic updates with rollback, Suspense, hydration with the Next.js App Router, infinite queries, and when not to use it.

Frontend & UI17 min

LLM Cost and Latency in Production: Token Accounting, Caching, Routing and Fallbacks

What happens to an LLM feature once real traffic arrives: where latency actually comes from, a per-feature token and cost meter with tenant budgets, structuring prompts for provider prompt caching, exact and semantic caching, model routing, trimming context, batch APIs, parallel calls, retries with fallback and circuit breakers, and the dashboard I watch.

Systems & architecture8 min

Streaming SSR and Suspense: What Actually Happens on the Wire

How streaming HTML works at the protocol level, where to put Suspense boundaries, avoiding waterfalls, selective hydration, Partial Prerendering in Next.js 16, the effect on TTFB, LCP and CLS, proxies that silently buffer your stream, and handling errors after a 200 has already gone out.

Performance9 min

An AI-Assisted Frontend Workflow That Holds Up in Production

Where coding agents genuinely help a frontend team and where they quietly fail, how to give them context with AGENTS.md and small tasks, plan-then-implement, verification loops, reviewing AI-generated PRs, supply-chain risks like slopsquatting, and which skills matter more now for mid and senior engineers.

Tooling & workflow8 min

Evaluating LLM Features: Knowing They Work and Keeping Them Working

Building a golden dataset from real usage, deterministic checks first, LLM-as-judge with rubrics and its biases, pairwise comparison, running evals in CI on prompt or model changes, tracking cost and latency alongside quality, online signals, tracing, and how to avoid overfitting your eval set.

Systems & architecture8 min

The View Transitions API: Page Transitions and Shared Elements Without a Library

How View Transitions snapshot the page and build a pseudo-element tree, startViewTransition in an SPA, transitions between documents, view-transition-name, view-transition-class and types, a list-to-detail shared element, reduced motion, performance traps, and using React's ViewTransition component in Next.js 16.

Frontend & UI8 min

Multimodal Input for LLM Features: Images, PDFs and Audio from the Browser

The frontend side of sending files to an LLM: file input, drag-and-drop and paste, sniffing types by magic bytes, downscaling images and stripping EXIF in the browser, HEIC from iPhones, PDFs, recording audio with MediaRecorder, presigned uploads with progress and cancellation, object URL cleanup, accessibility and what the server must still check.

Frontend & UI8 min

The Event Loop, Microtasks and Rendering: Why Your UI Freezes

A correct mental model of the browser event loop — tasks, microtasks, frames — tested with predict-the-output puzzles, then used to explain why UIs freeze and how to chunk work, yield to the main thread and move heavy work to a Web Worker.

Performance14 min

List Virtualization from Scratch: Rendering 100,000 Rows Smoothly

Building a virtual list in React + TypeScript by hand: windowing math with real numbers, overscan, variable heights with prefix sums and binary search, measuring with ResizeObserver, preventing scroll jumps, accessibility — and when not to virtualize at all.

Performance16 min

Structured Outputs for LLM Features: When You Need Data, Not Prose

How I build product features on LLMs that return typed JSON: structured output modes in the major APIs, defining schemas with Zod, handling refusals and truncated output, retry with repair, versioning prompts in code, realistic expectations about temperature, and designing schemas models handle well.

Systems & architecture8 min

React Compiler in Practice: Adopting It in a Codebase That Already Ships

What React Compiler actually does, the Rules of React it relies on, the ESLint plugin, incremental rollout with annotation mode and "use no memo", what to do with existing useMemo/useCallback, how to verify it works, common bailouts, third-party libraries and build cost.

Performance9 min

Writing Notes as an Engineer

Why I started writing down what I learn at work, the simple format I use, and how notes slowly turn into articles.

Learning & career1 min

Cascade Layers and @scope: Ending Specificity Wars in Large Codebases

Why CSS in large projects always drifts toward !important, how @layer changes who wins the cascade, traps like unlayered styles and the !important inversion, @scope with donut scopes and proximity, native nesting gotchas, and a step-by-step path for moving a legacy codebase into layers.

Frontend & UI8 min

Think in Systems, Not Screens

Frontend apps break when we design them page by page. A short field guide to mapping state, data flow and ownership before drawing the UI.

Systems & architecture2 min

Web Fonts Done Right: Fast, Stable and Correct for Vietnamese

How fonts affect LCP and CLS, choosing font-display, preloading the critical font, subsetting with unicode-range for Vietnamese, variable fonts, self-hosting versus CDNs, fallback metric overrides and next/font in Next.js.

Performance8 min

Estimating Frontend Work Honestly

Why estimates are almost always wrong, how to break work down by states, accessibility, responsiveness and i18n, why ranges with confidence beat single numbers, when to use a spike, how to talk to PMs, and how tracking estimates against actuals makes you better over time.

Learning & career6 min

Debugging Like a Senior with Chrome DevTools

Conditional breakpoints, logpoints, DOM breakpoints, XHR/fetch breakpoints, console utilities like debug(), monitorEvents(), $0 and copy(), the Network tab, the Performance panel and local overrides — plus the four-step process I use to find causes instead of guessing.

Tooling & workflow7 min

Feature Flags in the Frontend: Types, Evaluation, Rollout and Cleanup

Feature flags decouple deploy from release, but used carelessly they turn into tech debt and flickering UIs. This post covers the four kinds of flags, evaluating on the server vs the client, typed flag definitions in TypeScript, gradual rollout, A/B testing and a cleanup process.

Systems & architecture7 min

From Mid-Level to Senior Frontend: What Actually Changes

Becoming senior isn't about coding faster or knowing more frameworks. It's the shift from finishing tasks to owning outcomes. This post covers concrete behaviors, a self-assessment table, and the traps I fell into myself.

Learning & career7 min

Forms in React 19: action, useActionState, useFormStatus and Server Actions

React 19 brings forms closer to plain HTML: the action prop, pending state, optimistic updates and Server Actions. This post walks through how I build a complete signup form — validated on both sides, with per-field errors, accessible, and working even before JavaScript loads.

Frontend & UI7 min

Code Review Is a Skill: How to Give It and How to Take It

What reviewers should look at first, how to write comments people learn from instead of bristle at, keeping PRs small, handling disagreement — and letting tools handle formatting so humans can focus on what matters.

Learning & career7 min

A Mental Model for CSS Layout: From Normal Flow to Flexbox and Grid

Normal flow, block vs inline, flexbox (one dimension, content-out) vs grid (two dimensions, layout-in), intrinsic sizing, and why min-width: 0 rescues overflowing flex items — so you write layout from understanding instead of trying properties until it works.

Frontend & UI7 min

State Machines for UI: Making Impossible States Impossible

Why isLoading, isError and data living side by side breed bugs, how to model UI as states and events, a typed useReducer state machine for a submit flow, and when a statechart library is worth it.

Systems & architecture6 min

TypeScript Patterns That Actually Pay Off in Real Codebases

Discriminated unions, exhaustive switches with never, satisfies, branded types, as const and validation at the boundary — the patterns I use every day because they catch real bugs, plus when to stop typing.

Tooling & workflow7 min