Skip to content

MystenLabs/walrus-sites

Repository files navigation

Walrus Sites!

License

Walrus Sites are "web"-sites built using decentralized tech such as Walrus a decentralized storage network, and the Sui blockchain.

This means that there is no central authority hosting the sites. Only the owner of the site is in charge of the site's content and updates.

Use cases can span from censorship resistant sites to decentralized applications.

Overview

At a high level, Walrus is used to store the files of the site (your CSS, JS, HTML etc.), while a Sui smart contract is used to manage the metadata and ownership of the site.

Once you publish a site using the site-builder CLI tool, you can access a site using a portal. Portals are centralized services that provide a way to gather the site resources and serve them to the user.

Anyone can host their own portal and access Walrus Sites freely!

To browse walrus sites, you can either host your own local portal or access a third-party deployment on the internet like https://walrus.site.

Domain resolution of Walrus Sites is done with a combination of traditional wildcard domains (e.g. *.walrus.site) and the use of subdomains that correspond to [SuiNS domains][suisns].

For example, let's analyze the following site: https://stake.walrus.site

  1. We are provided with a third-party portal: https://walrus.site.
  2. The site SuiNS domain is stake, so we need to use it as a subdomain of walrus.site: stake.walrus.site.
  3. Therefore, we can access the site with standard HTTPS at https://stake.walrus.site.

Documentation of Walrus and Walrus Sites is available at docs.walrus.site.

Fun fact: the documentation is itself a Walrus Site!

Quick Start

Walrus Sites undergo a lot of changes, so the best way to avoid confusion with deprecated features please start by following the guide here.

File structure

This repository contains the various components of a working Walrus Site. To navigate the repository, these are the crucial directories you should know about:

  • The site-builder is a Rust CLI tool to create and edit your Walrus Sites, starting from the output of a standard website building tool (i.e., a directory containing html/css/js, like dist/ or build/).
  • portal contains the implementations of the portals to access Walrus Sites.
    • server contains the implementation of an HTTP server portal. When in doubt, deploy this one.
    • worker contains the implementation of a service-worker portal.
  • In examples there is a handy collection of websites to test the functions of the Walrus Sites.
  • move contains the smart contract for creating and updating Walrus Sites on chain.
  • In c4 there is the C4 model depicting the architecture of the project.

Star History

Walrus Sites is open source! Here is a graph showing the star history over time.

Star History Chart