DevOS achieves its desktop-OS illusion through a deliberately shallow component tree centred on a single React Context provider. There is no Redux store, no external state library, and no server. Every window you open, drag, minimise, or close is described by a plain JavaScript object in aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/dev-os/llms.txt
Use this file to discover all available pages before exploring further.
useState array, and every transition you see is a Framer Motion spring. Understanding those two pillars — the WindowManagerProvider context and framer-motion — explains almost everything about how DevOS behaves.
Component Hierarchy
main.js is the entry point. It mounts WindowManagerProvider at the root, then renders BootScreen, Desktop, and Taskbar as siblings inside it. All three children can read and mutate window state through the shared context without any prop-drilling.
BootScreen is rendered exclusively until the user clicks Login to Desktop, at which point a boolean in App flips and Desktop + Taskbar take over. The WindowManagerProvider persists across that transition so any state accumulated during the boot phase (none by design today, but extensible) is not lost.
State Management
WindowManagerProvider creates its context with React.createContext(undefined) and exposes it through the useWindowManager() hook, which throws a descriptive error if called outside the provider — a safety net that makes misuse obvious at development time.
Inside the provider, three useState calls track the entire window system:
| State variable | Type | Purpose |
|---|---|---|
windows | Array<WindowObject> | All currently open windows and their full state |
focusedWindowId | string | null | The id of the window that currently has focus |
zIndexCounter | number (starts at 10) | Monotonically increasing counter used to layer windows |
useCallback to prevent unnecessary re-renders in child components that destructure only the actions they need.
The useWindowManager() hook exposes the following interface to any component in the tree:
Window Lifecycle
Each entry in thewindows array is a WindowObject with the shape:
openWindow(id, config)— checks whether a window with thatidalready exists in the array. If it does and it is minimised, it un-minimises it and gives it focus. If it is already open and visible, nothing happens. If it does not exist, a newWindowObjectis pushed onto the array and focus is granted immediately.focusWindow(id)— setsfocusedWindowIdto the givenid, assigns the currentzIndexCountervalue to that window’szIndex, then incrementszIndexCounterby 1.minimizeWindow(id)— setsisMinimized: trueon the target window and clearsfocusedWindowIdif it matched.maximizeWindow(id)— togglesisMaximizedon the target window (i.e.!e.isMaximized), then callsfocusWindowso the maximised window rises to the top.closeWindow(id)— filters the target window out of thewindowsarray entirely, and clearsfocusedWindowIdif it matched.
Animations
Every window component wraps its root element in aframer-motion motion.div. The AnimatePresence wrapper in Desktop.js detects when a window is removed from the React tree and plays its exit animation before unmounting.
A typical window uses spring physics for a natural feel:
drag prop with dragControls bound to the title bar, so only grabbing the title bar initiates a drag — clicking inside the app content does not accidentally move the window.
The BootScreen uses the same primitives for its login panel reveal: initial={{ opacity: 0, scale: 0.9 }} → animate={{ opacity: 1, scale: 1 }} after the boot log finishes streaming.
Desktop Icon Registry
TheI array defined in Desktop.js is the single source of truth for everything that appears on the desktop. Each entry follows this shape:
id | label | App |
|---|---|---|
home | README.md | HomeApp |
about | about_me.exe | AboutApp |
projects | projects/ | ProjectsApp |
skills | task_manager.exe | SkillsApp |
work | career.log | TerminalApp |
case_studies | case_studies/ | CaseStudiesApp |
articles | notes.txt | ArticlesApp |
contact | mail.exe | ContactApp |
testimonials | reviews.html | TestimonialsApp |
components/apps/, import it in Desktop.js, and append a new entry to the I array. The icon grid, double-click handler, and window manager integration all work automatically — no further wiring is needed.