Back to Hub
SYSTEM ARCHITECTURE • MAY 2026

Blazing Fast Search via SQLite WASM.

Performing a global regex search across a large 10,000-file monorepo is a CPU-intensive task. If you attempt to traverse the Virtual File System (VFS) in JavaScript natively, you will lock the main thread and freeze the browser tab for several seconds. To solve this, NitroIDE implemented a highly advanced client-side database.

Full-Text Indexing via WebAssembly

When you import a project into NitroIDE, a background Web Worker spawns an instance of the official SQLite C engine compiled to WebAssembly. We generate a Full-Text Search (FTS5) index of your entire codebase, storing the resulting `.sqlite` database file directly onto your local SSD using the Origin Private File System (OPFS).

// Querying the local SQLite WASM database instantly
const db = new sqlite3.oo1.OpfsDb('/workspace/index.sqlite');

// FTS5 query executes in under 2 milliseconds
const searchTerm = 'authenticateUser';
const results = db.exec({
  sql: `SELECT filename, snippet(code_index, -1, '<mark>', '</mark>', '...', 10)
        FROM code_index
        WHERE code_index MATCH ?`
,
  bind: [searchTerm],
  returnValue: "resultRows"
});

Incremental Updates: The index is not static. We attach a MutationObserver to the IDE's text buffers. As you type, the specific file's row in the SQLite database is incrementally updated in the background, ensuring your search results are always perfectly up-to-date with zero rebuild lag.

Bypassing the Cloud

By moving indexing from an expensive remote AWS server to your local processor via WebAssembly, we eliminated network latency from the search experience. You hit CMD+Shift+F, and the results appear instantly.

Search at Light Speed.

Import a massive repository and try our global search.

Launch IDE