-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SilverBullet pivot to become an offline-first PWA #403
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zefhemel
changed the title
WIP: SilverBullet pivot to become an offline-first PWA
SilverBullet pivot to become an offline-first PWA
May 23, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SilverBullet has rapidly increased in terms of complexity over the last months by adding a desktop and mobile app in addition to the server mode. The goal of these additional app distribution models was the following:
So now we have:
However, this has lead to a lot of added development, build and deployment overhead. Since this is an open source, volunteer project, my time is limited and I struggle to test and maintain all of this.
Therefore the proposed direction here is to pivot the project (back, in a sense) to a PWA, but adapted to be fully offline capable.
To support the offline-capable part, the architecture shifts a little bit:
From the user perspective not much changes:
A few implications:
Since this is a big shift, I took the liberty to introduce another big infrastructural change: plugs are now no longer compiled to (big) JSON files, but to (much smaller) JavaScript bundles. In principle, all that needs to happen is to recompile existing plugs using
silverbullet plug:compile
and list the.plug.js
in yourPLUGS
file.This
local
branch is continuously deployed to https://local.silverbullet.mdTo test this branch:
You can delete the "data.db" file, because the server no longer keeps index data.
If you get into a weird state, you can flush all your caches and copies and stuff by visiting http://localhost:3000/.client/reset.html