Framework providers
The local framework patches add an explicit Silt provider to Teamplay's backend
factory and StartupJS UI's existing files factory. Application code keeps using
Teamplay $, sub(), and signal writes. MongoDB and Mingo remain available through
their existing selectors.
These patches target exact published npm packages:
startupjs@0.63.1 already forwards the server exports. The patches are available in
integration/framework/patches,
with installation details and provenance in the
integration README.
They have not been published upstream.
Enable the providers
Install the pinned framework packages, the Silt packages from this checkout or
release, better-sqlite3, and patch-package in your application. Copy the four
patch files into its patches/ directory, then run:
Add patch-package to the application's existing postinstall command so installs
reapply the patches. Set the environment before importing server modules: upstream
selects its database during module initialization. DB_PROVIDER=silt takes
precedence over MONGO_URL; leaving it unset preserves upstream selection.
The provider opens @silt-db/sqlite/server with a better-sqlite3 writer and a bounded
WAL reader pool. SILT_READ_POOL_SIZE defaults to 2. The shared database is exposed
as silt from teamplay/server and startupjs/server; custom SQL integrations use
its coordinated silt.sql facade. The backend owns this database. Drain file
requests, writes, and query polling before shutting down subscriptions and closing
the backend.
The files factory chooses silt when that owner exists; an explicit
DEFAULT_STORAGE_TYPE still takes precedence. New BLOBs live in silt_files.
Size and byte-range reads execute in SQLite through the reader pool, and the
provider accepts Buffer or Uint8Array uploads. The stored file metadata still goes
through ShareDB OT. Do not write directly to ShareDB snapshot tables or substitute
ordinary Silt collections for Teamplay document writes.
Each file's storageType selects its provider. DB_LOAD_SNAPSHOT is rejected
when selecting Silt because that setting refers to the Mingo snapshot layout.
Verify locally
From the Silt checkout:
The framework setup downloads pinned npm tarballs and patches isolated package
copies. The integration runs the actual published Teamplay backend and files
factory together. It covers live document/query updates, named lookup refresh
after a foreign write, BLOB operations alongside OT, WAL reads during a paused
writer transaction, and rollback. Provider tests also cover byte ranges, empty
files, typed-array views, deletion, and writable/read-only reopen. All four patches
were also applied successfully using patch-package@8.0.1.
The full StartupJS app registry/HTTP boundary is substituted with its backend exports in this fixture. A complete StartupJS server launch, upload routes, Sharp processing, browser/native file pickers, and Android/iOS runtime use are untested here. Test these in an application environment before submitting upstream PRs. The separate Teamplay integration covers local and WebSocket connections and durable document reopen; Expo validation records its own platform evidence.