Publish The New Web

A technical look at how we use our own tools to publish great sites to the open web.

The site you're reading now looks like a normal, regular-degular website. Nothing interesting, nothing fancy, just a good little static site with a small payload over the wire (112kb, no JS!). That's because it largely just is a regular-degular, pre-baked website. But it has a few differences that make it pretty interesting, we think.

Writing A Website

The first thing that we like, is that I'm writing this article inside of StuccoTL. StuccoTL is an application for creating static websites, half Content Management System half website builder. It works by creating sites with an Information Architecture model, basically a definition of what and how the sites content is structured and connected. That creates an app interface that's bespoke to the needs of what the website is trying to say and do. This means we have a nice clean, clear editing environment where we can control and edit every part of the sites data.

If we want, we can export all of this data in an open, portable format. That gives us a big JSON-LD document. We can take that JSON-LD document and do anything we like with it, for instance feed it into a static site generator.

Building A Website

Here at Stucco, our favorite web development stacks are the ones that get out of the way and deliver clean, compiled code to the web. We're talking about SvelteKit, Astro, and Preact. Our go-to daily driver is SvelteKit.

SvelteKit lets us write a static site generator, and using the data from the Information Architecture definitiion (or Site Model), we can be sure that we can render out whatever StuccoTL lets us write. We can then compile that SvelteKit application into a single JavaScript function that takes the JSON-LD file we export from StuccoTL and builds an entire website from it.

This means any builder that's compatible with the model can render out any website built with that model, entirely plug-and-play.

In StuccoTL, we can grab our Stucco Works builder, and from there preview, build, and publish our site.

Publishing A Website

But wait! To publish a website means it needs to go on a server somewhere on the open web where folks can get to it. Everything so far has been happening on my computer! Where does the built site actually go?

Here's the bit where the past five years of R&D start to pay off.

Our sister organization Stucco Software is a non-profit, 501c(3) engineering studio dedicated to free, open-source software that works to realize the dream of an open web where communities and individuals control their own data, free from big platforms.

One of Stucco Software's big projects is Brolly, a community data store that supports both Bluesky's ATProtocol and the Solid Project. Brolly is the magic behind StuccoID – a single login with data interoperabillity between any Solid-compatible product.

Stucco Software also maintains SolidState, a local-first replication and sync engine for personal data stores built on top of PouchDB.

These services are all free and open source! Anyone can build on them, and if you want we will help you do so.

Okay, so…

StuccoTL accepts a login with any WebID connected to a personal or community data store. Once you log in, youre sites data are automatically synced between your local device and your online data store.

And this personal online data store is where this built static site is published. You can this article directly in the data store at https://nikolas.id.stucco.software/~/thoughtloom-sites/stucco-works/first-principles/index.html.

Making It Nice

Pretty gross URL tho! Doesn't exactly roll off the tongue, and you can see that trying to navigate around gets a little weird. Also serving static sites to the public is not exactly what these online data stores are designed to do, so there's a chance things could get a little crunchy if we just did that.

This is where we bring custom domains to StuccoTL, with a project we call Porte. This is a small CloudFlare service that maps a nice, clean custom URL like www.stucco.works to the data store root, https://nikolas.id.stucco.software/~/thoughtloom-sites/stucco-works/. It caches the entire static site, and does the work of delivering it to users all over the world, so they get the site from a server close to them rather than needing to talk to the StuccoID server in Amsterdam. And because we have full control over when a site changes, publishing the site means updating this cache.

This gives every site published with StuccoTL world-class performance and protection. For really, really cheap.

What Makes It Even Better

So far, what we've described is a really nice end-to-end CMS for Static Sites. Kind of like if WordPress was an app on your computer that didn't need PHP security updates every other week.

But because we've built all this around Solid Project data stores, we have some extra tricks up our sleeve that a static site simply cannot do.

Cross-Device Sync

StuccoTL is also an iOS app. And since you can log in with your WebID, and it's syncing with SolidState, we have live sync across devices. This means I can edit and preview my site on my phone. And since the builder is just a single JavaScript function, I can create a full build and publish from my phone as well.

Fully Permissioned Access Control

This is one space we're just scratching the surface on, and we're not yet entirely sure about all the ramifications, but it's exciting af.

Every URL in a Solid data store has an access control policy which determines who can read, add to, or edit the file. This can be defined as "just the owner" to "completely public" to "just these WebIDs". What does this let us do?

Comments

We could create a public, update-only resource that accepts comments from visitors. This would let anyone visiting this site add a comment to an article, which I can moderate and approve from my phone.

Shared Editing

We could define WebIDs that have access to edit the core data of the site, meaning that I can share this data with anyone else and we can all work on it together and publish builds from anyones account.

Paywalls

Or, perhaps most exciting, we can define certain URLs as "members only", requiring that a visitor sign in with their own WebID and be a paid-up member to view the page at all!

We think static sites with a full authentication and paywall flow that cannot be bypassed is a pretty neat idea, so stay tuned to more developments in that direction.

To Sum Up

StuccoTL is still in development, but we're hoping to bring a half dozen or so real sites to real people soon. If you're interested in giving it a test drive, reach out to nikolas@stucco.works and we'll get you your own static site with superpowers.

Tell us about the work

Send us an email and we'll figure out how to make it happen.

Nikolas Wise