Rotonde / beaker

Rotonde client with user account combined(deprecated)
MIT License
205 stars 37 forks source link

Suggestion: Move core logic into seperate Archive #41

Open webdesserts opened 6 years ago

webdesserts commented 6 years ago

One issue that has become apparent with the current version of the beaker site (unless I'm missing something) is that users don't automatically get updates for the core scripts and styles. I think this will be important for the ux of non-devs, so I suggest the following: split rotonde into two archives.

  1. The User Portal which would just be the index.html, media/content and the links/custom.css
  2. The Rotonde Core which would contain pretty much everything else in scripts/ and links/ and media/.

You could do this by swapping the relative paths in the <link> & <script> tags for absolute urls to an external Dat Archive.

- <link rel="stylesheet" type="text/css" href="links/main.css"/>
+ <link rel="stylesheet" type="text/css" href="dat://6074e23e900e310aac23a6ed098dfde3f65f4297c8e8077717df1460fbb9d87d/links/main.css"/>

You would then be able to push updates to the "Rotonde Core" and all users would automatically get the latest bits as long as they keep these links. If they want to customize any of this, they can just download the file, drop it in their Portal archive and link to it there. If you wanted to go the extra mile, we could even create a quick "Eject" button of sorts that would automatically do this for them and would essentially lock the files down to their current version and stop accepting updates from core.

Example

Portal git: [https://github.com/webdesserts/rolling-rotonde]() dat: dat://rolling-rotonde.webdesserts.com

Core git: [https://github.com/webdesserts/rolling-rotonde-core]() dat: dat://rolling-rotonde-core.webdesserts.com

neauoire commented 6 years ago

Hey ! that's exactly what @cblgh and I were discussing today! I've migrated my current setup to this new flow. I will try and announce this new setup tomorrow :)

webdesserts commented 6 years ago

Haha, well then I guess I didn't need to put that example together. Glad I don't need to do any convincing though 👍. Good to hear.

neauoire commented 6 years ago

I just shared this really clear description on Twitter, so we'll keep this open until it's fully deployed :) Thanks for putting this together.

roxaloxa commented 6 years ago

Holy hell this is an extremely cool way to do this!

frozenpandaman commented 6 years ago

Yeah, huge fan of this implementation as well… looking forward to seeing this in the future!

lsjroberts commented 6 years ago

Great idea!

cblgh commented 6 years ago

one cool thing that came up in a discussion between @louiscenter & @pfrazee in #beakerbrowser on freenode when i first posted was the use of beaker's versions.

so you could do something like dat://h3h31337...7331+149_ to keep your portal locked to version 149 (where presumable everything was working just like you wanted it to).

using this idea we could implement a command into the rotonde operator that could be something like

update:149
update:latest

where latest would be the dat link without the version number appended e.g. dat://h3h31337...7331

edit: oh yeah and what would also be nice is a corresponding command to change source easily like

set:dat://deadbeef...1337
set:local
ghost commented 6 years ago

keep core versions in folders like every package manager does.

dat://<rotonde_core_base or ur_own_mirror>/149/[scripts,links]

and dat://<rotonde_core_base or ur_own_mirror>/stable/[scripts,links] dat://<rotonde_core_base or ur_own_mirror>/testing/[scripts,links] which will link to the latest of those kinds