Architecture: SESSION 46 PREP: What is the storage and sync architecture?

Documentation for Sessions

πŸ—οΈ Architecture: SESSION 46 PREP: What is the storage and sync architecture?


πŸ“‹ Decision Context

Question:

SESSION 46 PREP: What is the storage and sync architecture?

Task: Session 46 Preparation: Storage Architecture


🎯 Decision Made

Chosen:

Storage system has three layers: (1) Flash Persistence (IndexedDB) for instant client-side state via autoFlashState(), (2) MongoDB backend via SpaceDatabaseService with space_{spaceId} databases, (3) Sync engine (IntelligentSyncEngine) bridges flash↔MongoDB. Key services: FlashStateHydratorService, GgStorage, SyncEngineService. Data isolation: universe_{universeId}_{collection} naming pattern.

Options Considered:


πŸ’­ Reasoning

Session 46 must ensure generated modules: (1) Use flash persistence for client state, (2) Sync to correct MongoDB collections, (3) Follow universe data isolation pattern. UniverseDataController at /api/spaces/:spaceId/universes/:universeId/data/:collection/* provides dynamic CRUD.


πŸ“ Files Involved


πŸ”— Related


Auto-generated by MCP Smart Consolidation