3 ms·
A framework for offline and decentralised web apps
- deleted 6y ago[deleted]
- geoah 6y agoInteresting project, a couple of points that seemed odd or I'd like some more information about: - [minor] "MVP": is used in a number of places and I'm not sure if it means "minimum viable product" or some weird type of framework (model view presenter or something). - "decentralised": from the post alone I'm not sure how this is accomplished, is this a federated or p2p network, does it require some sort infrastructure? if not, how is the browser to browser communication achieved? Web RTC or some other kind of magic? How is peer discovery handled? - "file-based approach to storing data": do we consider indexdb file-based or did I miss something? - "blockchain": I cringed when I first read this, mostly cause I don't personally consider blockchains a good solution for decentralizing personal data. -- as I continued reading the post I got confused a bit more as it doesn't seem that an off the shelf blockhain is being used, but rather the primitives behind blockhains, basically a dag/merkle-tree with groups of messages that the author calls blocks. -- in traditional blockchains, only one the longest chain in the possible tree of blocks is considered the accepted/verified one, but I'm not sure how this branch is chosen in this case, or if all paths are accepted, which is fine to do but then I don't understand the need to group messages and call this a blockchain. This also fits in with the conflict resolution a the end. In a blockchain fashion the conflict resolution would have been happening during the block creation as the events would have been validated. - open source, contribution, docs: I'd be interested in learning more about the project but neither the post nor the homepage offers any links to github or other repository for the code or documentation. any way of following development and chatting with the team would be nice, irc, slack, discord, matrix, gitter -- literally anything other than email :P ps. When I found this thread there seemed to be a comment by the author of this framework to which I was trying to reply to. Either the comment has been removed or HN is being flaky, in any case, to the author: this is really interesting, keep up the good work :)
- samternent 6y agohey geoah, Thanks a bunch for taking the time to write. I am referring to minimum viable product here. I really tried to avoid using the term blockchain for just that reason :) And you're right, this runs a blockchain inspired Merkle tree to handle transactions and we deal with consensus in the standard blockchain way, longest chain wins. It's a custom bit of code, a functional implementation of a blockchain that runs in the browser using the Web Crypto API. That merkle tree is where the file based approach comes in. We export the JSON representation of the tree (can be encrypted down to the authentication module), which can be downloaded from the browser. Then that file becomes our source of truth, IndexedDB knows how to read the data, and our frontend plugs into a reactive fetcher on top of that. So we write to the tree and read from the DB. Now the file is saved, it can be shared and that's down to the user to chose how to do that. I don't have anything extra built for that at the moment, but I've ran a working prototype of a simple https://dat.foundation/ https://dat.foundation/ implementation with pretty good success for sharing. I've also got in mind how it could work with services like dropbox and cloud drives as file storage. I figure as long as I'm not storing anything (I don't run a server, DB or cloud functions, just a static vercel site) then it's decentralized. Being decentralized to me is about providing just an interface, then allow the user to plug in a suitable storage provider (ps. Sorry, I did post up here but then I removed it - that's so much for taking the time to reply)
- geoah 6y agoThanks for the reply, the file-based stuff makes more sense now, I kinda understand where you wanna go with this. A way to keep up to date with project updates would be nice. :)
- samternent 6y agoAround being open-source, the short answer is not yet. I'm working on this project alone right now, so I don't have any immediate plans to open source things. But I've been keeping my code clean and modular behind the scenes. :) I've abstracted the core logic out, which includes the blockchain and indexDB/reactivity layer, which is written in Typescript. Then the app itself is built with Svelte.
- deleted 6y ago[deleted]
- deleted 6y ago[deleted]