01
WritingMarch 18, 2026

Building an OS in the browser

A deep dive into recreating Windows XP entirely in Next.js — from z-ordering nightmares to an AI-powered command prompt.

I built a full Windows XP recreation in Next.js. Working taskbar, start menu, draggable windows, right-click context menus, multiple apps running simultaneously. The command prompt is AI-powered — type anything and it responds in character as a sentient terminal.

The hardest part wasn't the UI. It was window z-ordering. Getting click-to-focus right when you have multiple Radix Dialog sheets fighting for attention took longer than the entire taskbar.

The whole thing runs at dennislee.me/desktop. Try typing "format c:" in the terminal.