How beefyandtheducks/saveshare works
SaveShare is a desktop client and WebSocket server for registering, cataloguing, and synchronizing local save files with cloud saves. Users connect and authenticate, browse saves, then register or download saves, check them out, exchange full files or manifest-based deltas, and release checkouts. The client’s sync service coordinates catalog and local-save state; the server authenticates connections and dispatches protocol messages to save operations. The tree and sampled files support these main responsibilities, but unsampled service and handler wiring is shown only where paths and dispatch behavior are evident.
Main entry points: ServerSession.cs Client session · SaveSyncService.cs Save synchronization · MessageHandler.cs Message dispatch · SaveCatalogService.cs Save catalog
Components 23
Desktop client
- Client UI
Client/Views/MainWindow.axaml.cs - Main view model
Client/ViewModels/MainWindowViewModel.cs - Authentication
Client/Services/AuthenticationService.cs - Save catalog
Client/Services/SaveCatalogService.cs - Save synchronization
Client/Services/SaveSyncService.cs
Protocol transport
- Client session
Client/Networking/ServerSession.cs - Connection manager
Client/Networking/ConnectionManager.cs - WebSocket transport
Client/Networking/WebSocketTransport.cs - JSON message codec
Client/Networking/JsonMessageCodec.cs
Shared save formats
- V1 message protocol
Common/Protocol/V1/Protocol.cs - Save manifests and packing
Common/SavePacker.cs
Server operations
- WebSocket endpoint
Server/ConnectionManagerV1.cs - Message dispatch
Server/MessageHandlers/V1/MessageHandler.cs - Sign-in handlers
Server/MessageHandlers/V1 - Save listing handlers
Server/MessageHandlers/V1 - Checkout handlers
Server/MessageHandlers/V1 - Full save handlers
Server/MessageHandlers/V1 - Delta sync handlers
Server/MessageHandlers/V1
Persistent state
- Save registry
Server/SaveRegistry.cs - User registry
Server/UserRegistry.cs - Local save store
Client/Storage/LocalSaveStore.cs - User store
Client/Storage/UserStore.cs
Other components
- Desktop user
Connections 28
- Desktop user → Client UI: uses
- Main view model → Authentication: authenticates
- Main view model → Save catalog: browses
- Main view model → Save synchronization: synchronizes
- Authentication → Client session: signs in
- Authentication → User store: loads and saves
- Save catalog → Client session: lists saves
- Save catalog → Local save store: loads local saves
- Save synchronization → Client session: exchanges saves
- Save synchronization → Save catalog: refreshes
- Save synchronization → Local save store: records local saves
- Connection manager → Client session: connects
- Client session → WebSocket transport: transfers messages
- Client session → JSON message codec: encodes messages
- WebSocket endpoint → Message dispatch: dispatches messages
- WebSocket endpoint → Sign-in handlers: authenticates via
- Message dispatch → Save listing handlers: dispatches
- Message dispatch → Checkout handlers: dispatches
- Message dispatch → Full save handlers: dispatches
- Message dispatch → Delta sync handlers: dispatches
- Sign-in handlers → User registry: creates or loads
- Save listing handlers → Save registry: reads save catalog
- Checkout handlers → Save registry: updates checkout
- Full save handlers → Save registry: reads and updates
- Delta sync handlers → Save registry: reads and updates
- Save synchronization → Save manifests and packing: packs and applies deltas
- Full save handlers → Save manifests and packing: packs and applies
- Delta sync handlers → Save manifests and packing: builds and applies deltas