vanila-io / wireflow

Wireflow - user flow chart real-time collaborative tool

Home Page:https://wireflow.co

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Save progress in localstorage

entrptaher opened this issue · comments

We should have a simplified way of saving the state in localstorage in case the page is reloaded. Once it's done, we can think of saving them on server and realtime collaboration at a later stage.

We can also try sqlite, indexdb, webSQL etc, though it's unsure if it's going to work on mobile devices.

Ok, so I was looking into how we can do this, there seems to be a way when a new node is added to the canvas we can save it in storage.
Another idea would be to have a file-based saving, where a user can save and load their diagrams from a file, as rn we are saving as image, we can save the diagram as a JSON file and have an option of import diagram.

Another idea would be to have a file-based saving, where a user can save and load their diagrams from a file, as rn we are saving as image, we can save the diagram as a JSON file and have an option of import diagram.

That might be a good idea before we introduce user accounts, database, and server thing.

Currently one of the team members had some progress on saving it in local storage
https://www.loom.com/share/170a5a884ae84807b7b4c137b1fb6afe

Oh, this looks promising, I was looking around in the code of FlowCanvas component and was thinking of saving it from there.
I guess this works.

commented

realtime collaboration at a later stage

yes please!

Hello folks! I saw there's a PR to add local storage (#61) but it's still not merged. Since I want to start using it, I deployed one in https://wireflow.wzulfikar.com. Please feel free to use it if you want.

wireflow-wzulfikar-com.mov.mp4

Deployment is in sync with https://github.com/wzulfikar/wireflow/tree/wireflow.wzulfikar.com

Maybe related to this, it would be really nice if a project could be exported to later be imported again. I don't know if that is like a super complicated request, but it would make sure the progress is 'safe' for a long period of time and I could continue between different browsers/laptops.