Just for the records: for my own educational purpose, I have written a simple Yjs database provider for browser-based applications (called y-localstorage) which persists on localStorage
Feel free to have a look at it and use it for your own studies - but do not use it in production!
Again, just for the records: I’ve added some error handling to the (still educational) y-localstorage database provider - always with the idea in mind, that already persisted data should always be safe (even in the case of update compaction)