Introducing dweb Project
Publish and Build on the Decentralised Web
dweb Project is an open source project for:
- a command line app to publish websites on Autonomi. It includes a local server so anyone can view them in a standard web browser after starting a server with the same app (see dweb-cli at
crates.io
); - a Rust library for anyone who wants to build apps to do this and more (see dweb at
crates.io
); - an HTTP API for building decentralised web apps without a central server.
That's stage one. In time dweb Project aims to provide:
- perpetual access to every version of every website, or tree of files;
- versioned storage for any collection of data, not just websites and files;
- forever backup using rclone and any app built with rclone support;
- decentralised web apps that talk to Autonomi using a standard HTTP API;
- a command line app for uploading, downloading and inspecting data stored on Autonomi.
Note: Autonomi is a fully autonomous peer-to-peer network with pay-once perpetual storage. So websites an other data published using dweb will be there forever - along with every version of them. No more link-rot! See https://autonomi.com
Project Status
As of late 2024, the app and library are under active development, but the code for versioned data already been demostrated to work on the Autonomi network. This includes functionality for publishing and viewing versioned websites in a project called awe (https://github.com/happybeing/awe
). The first task for me is to migrate that functionality into the app by using the library. Fairly easy!
This post is for those who want to know what is coming, think about trying the app out and consider giving feedback. It is also for developers who want to use or learn from these projects (which are Open Source - AGPL license).
dweb Library
At this point the Rust library is centred around basic interaction with the decentralised network, and support for storing versioned data. The latter includes storage of file trees and websites, for which a built-in type is provided. It is though easy to create and manage a history for any custom data type as explained next.
dweb::trove::TroveHistory
TroveHistory
is a templated type which makes it easy to store and access an ordered history of any kind of data.
Any struct with any data types as members can be stored and a history of all versions retrieved. To do this, implement the Trove trait for your struct, which is trivial, and implement serde serialisation for it (also trivial - a single line Rust macro).
dweb::trove::FileTree
is a ready-to-use type with methods for storing and accessing a tree of files or a website. FileTree
is what the dweb app uses for publishing and viewing websites on Autonomi.
I'll stop now because my toast is burning!