Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm making an interactive garden designer to help plan a (mostly rose) garden in my front lawn that will be visible to the town.

https://garden.simonsarris.com/

It all works (double click to place plants, undo/redo, copying, etc etc), but it needs more items. And saving and loading does not work yet. Actually, since this is HN, you could write

    go.Diagram.fromDiv(myDiagramDiv).model.toJson()
To save and share. But I need to implement some server saving because normal people do not adore JSON as much as we all do.

Some examples of what I'm thinking so far to give an idea of what loading might look like: https://twitter.com/simonsarris/status/1705056223333151053

I have considered making a more public version of this that anyone can use for their own garden, but that would take more non-trivial work.



You could simply encode the json to base64 and put it in the url fragment (hash). Then you can save by bookmarking the url and share by copy/pasting it, all without a server. I've seen some web games use this method but I can't remember which off the top of my head.


The Vega Lite plugin does this: https://vega.github.io/editor/#/custom/vega-lite

I think Google maps does this for manual bike routes too?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: