mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-25 18:47:42 -06:00
The catalog Store on the web is an in-memory mirror (apps/lightcraft-web/src/files.rs) loaded from browser storage at start-up and flushed in the background in modification order (so a snapshot always lands before the log reset that follows it). Storage is OPFS when writable from the main thread (createWritable), else IndexedDB (?store=idb forces it); ?reset clears it. Imported originals are stored as originals/<content hash> and referenced as web/<hash>/<name>; the main thread keeps a bounded memory cache and loads misses (and the active photo) asynchronously. view.json and ui.json are saved every second when changed. Engine: Session::open_library_in(LibraryStores) opens a library from any Store (presets, view and prefs go through it too); Session::save_view; Copy imports into a non-disk library add. JS automation API: lightcraft.command(id, paramsJson) (+ web.stats). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>