Also, the project uses IndexedDB for persisting the session. At first, I used localStorage in my projects, but I found it quite limiting when wanting to store bigger or more complex data structures. However, both strategies are viable. Especially, if you just want to store a JSON-encoded representation of your game’s state—and it’s smaller than a few megabytes—then localStorage is a much simpler way to accomplish that. Seriously, it’s the difference between just calling localStorage.setItem(), versus ensuring a database exists, creating it if not, and connecting to it, before you can set that item.
I’m not proud of this source code, but it’s pretty loadbearing: https://github.com/nicross/the-omega-reach/blob/main/src/js/app/storage/api.js