Old Windows follows a straightforward React architecture: a single-page app mounted atDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/old-windows/llms.txt
Use this file to discover all available pages before exploring further.
<div id="root"> in index.html, bundled by Vite, with all window state held in a React context at the top of the tree. There are no external state managers, no server-side rendering, and no routing library — just four components, one context, and one config array that together produce the full Win98 desktop experience.
Component tree
The render hierarchy from root to leaf looks like this:WindowProvider (WindowContext.js)
The outermost wrapper. It creates a React
useState array called windows and exposes six action callbacks — openWindow, closeWindow, minimizeWindow, maximizeWindow, restoreWindow, and focusWindow — through context. Every component that touches window state reads from this context via the useWindows() hook.Desktop (Desktop.js)
Mounted directly inside
WindowProvider. Desktop does four things simultaneously:- Maps over the
appsarray fromconfig/apps.jsto render one desktop icondivper app. Single-click selects; double-click callsopenWindow. - Maps over the
windowsarray from context to render one<Window>component per open (or maximized) window. - Renders the visitor counter widget (bottom-right, starts at
1337042, randomly increments every ~3 s). - Renders the
<Taskbar>and the two CRT effect divs (crt-overlayandcrt-flicker).
Window (Window.js)
One instance per entry in the
windows context array. Each Window is a Framer Motion motion.div that handles dragging (via useDragControls), minimize/maximize/close title-bar buttons, and a status bar with WebRing navigation (Prev / Random / Next). Returns null when the window’s state is "minimized".Taskbar (Taskbar.js)
Fixed to the bottom of the viewport at
z-index: 9999. Contains the Start button (which toggles the Start menu pop-up), one taskbar button per open window, and a live clock that updates every second. Clicking a taskbar button focuses, minimizes, or restores the corresponding window depending on its current state.Data flow
All mutable state lives exclusively inWindowContext. No component maintains its own copy of which windows are open — they read the windows array and call the context actions:
openWindow is called it appends a new window object to the windows array. When closeWindow is called it filters that object out. Every other action (minimizeWindow, maximizeWindow, restoreWindow, focusWindow) produces a new array via .map() — the state is never mutated directly. Because Desktop and Taskbar both derive their output from the same windows array, they stay in sync automatically through React’s re-render cycle.
Config layer
config/apps.js exports a single apps array. This array is the only place in the codebase where the nine built-in apps are declared. Desktop imports it to render icons; Taskbar imports it to populate the Start menu and to power WebRing navigation inside each window’s status bar.
Each entry in the array looks like:
Architecture sub-pages
Window System
Drag mechanics, Framer Motion integration, z-index stacking, window state lifecycle, and the WebRing navigation bar.
App Config
The
apps array structure, all supported fields, and how Desktop and Taskbar consume the config to render icons and menu items.