Closed Zubs closed 1 month ago
@Zubs - I took a look at this and had a few thoughts that may be helpful…..
How I would imagine this working is very similar to how it would work with a regular REST API. Essentially whenever the state gets updated, that gets converted to yjs and sent to the backend via a sockets based storage service. You can see the roughly implemented REST API service here: https://github.com/yatt-ai/yattie/blob/ok/integration/src/services/storage-options/restApiService.js and I think that sockets will eventually replace this service when they are ready.
Then whenever the state is updated it is also set to the socket.
People will still be able to use the app locally without the backend connection if they choose so we have to keep in mind that the sockets connection will be optional when running in Electron. but it will not be optional when running in the browser.
for now it may make your job easier to just implement it to only work in the browser and we can add Electron support later.
Let me know what you think and if you have any questions.
Pull Request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Number: N/A
What is the new behavior?
-
-
Does this introduce a breaking change?
Does this introduce UI changes? If so, have they been tested on both dark and light modes?
Other information