userData/fildos.db.
Zero native dependencies
The engine is Node’s built-innode:sqlite. Nothing to rebuild against
Electron’s ABI, and Vitest can hit the real engine in tests. Drizzle ORM sits
on top via its sqlite-proxy driver (a ~15-line adapter in connection.ts).
Because node:sqlite is still experimental, bundlers don’t recognise it as a
builtin — it’s loaded with process.getBuiltinModule('node:sqlite'), never a
static import. This is why FilDOS requires Electron ≥ 35 (Node 22), and why
CI runs Node 22.
Modules
Migrations
Migrations are hand-written plain SQL, appended to aMIGRATIONS list and
applied by version. For a schema change:
COLLATE NOCASE on
tags.name — are hand-tuned), then paste it as a new MIGRATIONS entry. The
runtime never reads /drizzle; it’s a scaffolding aid only.
Single-statement mutations
Every mutation is a single SQL statement — no multi-await transactions. Since concurrent IPC handlers can’t interleave within one statement, the database can never end up in a half-applied state.Following files: remapPaths
After a rename or move, handlers call remapPaths(old, new, sep). A single
prefix-safe UPDATE OR REPLACE carries tags, recents, folder views, and
index_state to the new path; file_chunks follows index_state through its
foreign-key cascade. All the AI-index and graph tables cascade the same way, so a
move or delete carries — or cleans up — everything derived from a file.