jaroslaw-weber / keyfab

keyboard layout design editor
MIT License
27 stars 1 forks source link

sharing layout feature #17

Closed jaroslaw-weber closed 5 hours ago

jaroslaw-weber commented 3 weeks ago

So the idea is to share layouts with other people easily.

The original idea was to do it fully on frontend but moving it to backend will help grow the community better and allow for reusing other people layouts by exploring them on a page.

So I plan to host simple backend and share that code as open source.

Rough plan for sharing feature:

alextremblay commented 6 days ago

one way to do it would be to have a "share" function which serializes the layout data to JSON and then base64-encodes it, and prints out a link like https://jaroslaw-weber.github.io/keyfab/?data=<base64-data>

and add code to the webpage to look for that data parameter, b64-decode it, parse and deserialize the JSON layout data

jaroslaw-weber commented 5 days ago

@alextremblay thanks for the idea! I also considered something similar.

Actually I also have been looking into setting up simple backend with pocketbase. It will be simple enough but allow to easily share layouts and access layouts from different devices.

I've been very busy these days but I will at least try do the sharing feature first since I think it's most important currently

alextremblay commented 5 days ago

yeah, i've looked at things like pocketbase and firebase and couchdb in the past. problem is, even if the DB itself if free and open source, you need a place to host it, and that's almost never free.

the places that offer free tiers for arbitrary software /container hosting usually either don't last long or eventually ratchet up their prices until its no longer free.

The benefit of embedding all the data for a given layout in the layout's URL is that hosting is completely free and that "free tier" can never be taken away from you lol

jaroslaw-weber commented 5 days ago

I was thinking more about just paying :). Small server would be enough. But as you are saying, having an option to run everything on FE could be nice. I am definitely open to pull requests, but plan to focus on adding a backend in the near future.

jaroslaw-weber commented 5 hours ago

merging basic backend features. ill make separate ticket for sharing styles. also now whole layout can be exported into 1 file so should help sharing without the url.