The four layers
window.fsapi, window.watcher,
window.tags, window.recents, window.views, window.prefs, window.llm,
window.chats, window.graph, and so on — each defined in src/preload/index.ts
and typed in src/preload/index.d.ts.
Security model
Because the renderer is fully sandboxed, every capability it has is something the
preload layer explicitly, and narrowly, exposes.
Main process modules
Renderer state
State is React context, no Redux:state/navigation.tsx— current path, back/forward/up history, sort, view mode, column widths, search query, refresh token (useReducer).state/clipboard.tsx/state/undo.tsx/state/toast.tsx— copy/cut, the undo stack, and notifications.hooks/useFileActions.ts— all mutations funnel through here; each runs the IPC call, toasts, refreshes, and pushes an inverse onto the undo stack.hooks/useTags.ts— all tag mutations funnel through here so the sidebar, dots, menus, and info panel stay in sync.
Repository layout
Next
The IPC Contract
The Result-typed spine that connects renderer to disk.
Data Layer
SQLite via
node:sqlite + Drizzle, with zero native deps.