Web 3.0 around Fossil SCM

Robert Guiscard
2 min readJan 12, 2022

I am not sure it is a brilliant idea or a dumb one. But it occurs to me that we can build a decentralized internet around fossil scm. Here is how.

First, the concept of Web 3.0 is vague to me. It seems to emphasize on decentralization, and Fossil SCM is a decentralized code repository with everything in a single SQLite file. Any one can put their source codes, apps, websites in Fossil SCM and host the single Fossil SCM as sqlite database on internet. Users just need to checkout the Fossil SCM via its url as what we do for Web 2.0 to checkout web content via its url. Once a Fossil SCM is checked out, it creates a directory with all contents you want to deliver to the users, presumably in HTML/CSS/JS. Users just need to spin up a http server, e.g. Althttpd, and point to the repository. Now, users can read all the contents from local repository without staying online. All contents can be updated easily as a single checkout (update) from remote Fossil repository.

To prove this concept, I create a public Fossil repository called fossil_web3. It includes a TodoMVC in vue.js. You just need to check it out and run the http server to use it. Here are steps which can be written in a script to run automatically.

  1. You need to have Fossil SCM installed, which can be done by your package manager.
  2. Checkout the repository
> fossil clone https://chiselapp.com/user/rguiscard/repository/fossil_web3

3. Go into the repository and start the http server. You need to compile it first if you want to use althttpd

> cd fossil_web3
> cc -Os -o althttpd althttpd.c
> ./althttpd -root PATH_TO_REPOSITORY/www -port 8080

Now, load the web app at localhost:8080 and you should have TodoMVC running on your computer. Due to the use of CDN, it is not a completely offline app. But it is an easy fix.

You can write a script to run these tasks automatically. Fossil SCM is written in a way that it is easy to distribute via self-hosting. You can include a static web site or dynamic web app in Fossil SCM. While it does not prevent any ad-tracking through javascript, a well-written one should allow users to use or view the web contents without internet connection.

This may not work for all type of web apps, but most static web sites, e.g. new and blogs, and simple web apps should work.

--

--