Notes from the Archival team. Subscribe with RSS, follow @updates@archival.dev from Mastodon, or @archival.dev from Bluesky.

Sell from your Archival site

Archival sites can now take payments. Connect your own Stripe or Square account to a site from its Overview in the editor, and your pages can sell what's in that account's catalog.

I've been focused on shipping the features that I miss most or that are complex to set up or test on existing website hosts (email, DNS, functions), and we saved the biggest one for last, but I'm happy to announce that all Archival Pro sites can take payment and manage stores, using a minimal, static-friendly approach.

This is a bit complex since things like stock and carts can't be managed directly in liquid, so there needs to be a live element and an API that makes sense for drawing things, and we don't want to inject into customer sites or do similar hacks.

Here's where the design landed:

  • You're the merchant. Buyers pay you on your provider's own hosted checkout page, and the money settles to your account. Archival never holds it and takes no fee on sales. Your provider's processing fees are the only ones. It'd be cool to set up a bank in the distant future, and I suspect we could squeeze the margins more than existing providers, but for now we are happy to avoid the legal headache, chargebacks, credit risk, etc of setting up a managed payment flow, and this split is arguably the one that gives our customers the most control.
  • Your catalog stays where you already manage it. Products and prices live at Stripe or Square, and your site reads them. Change a price or take something off sale there and your site picks it up within minutes, without a deploy. Templates also get a copy of the catalog when the site builds, under archival.payments, so a name and price can be plain HTML.
  • Simple first, carriers add more. Your pages build to static HTML - your products are now available via an archival.payments object directly in liquid, and via site.payments in carriers. This means you can render html/rss/etc static product lists, but still manage dynamic stock quantities and other non-static information via small, edge-local endpoints.

Simple cart behavior

In addition, we provide a simple cart javascript file that will work for most basic use cases, hosted under the _archival namespace on your site. This means for simple use cases, you need not write a single line of javascript and you can still have a fully featured store.

Add this to your archival_editor.toml:

[payments]
cart = true

and include <script src="/_archival/cart.js"></script> on your pages. That gives you window.archivalCart: add variants to it, show a count that stays in sync across tabs, and call archivalCart.checkout() to send the buyer to pay. A shop that sells its catalog at its catalog's prices needs nothing written on the server at all.

When a checkout needs to do more, like take a discount or a donation, fill in the buyer's email, or record an order, point the cart at a carrier of your own:

await archivalCart.checkout("/carriers/checkout", { coupon });

The cart docs include a carrier that does exactly what the built-in checkout does, ready to copy and change. The cart's types are on npm as @archival/cart.

Test environments

The editor's preview takes real checkouts in a test account Archival runs at your provider, so you can click through the whole thing, from cart to hosted checkout to thanks page, with your live catalog at its real prices, and no money moves. This works in the iOS and Mac apps and in Claude editing sessions too.

Locally, ARCHIVAL_PAYMENTS="$PWD/payments.local.json" archival run reads a catalog from a JSON file and checks out on a stand-in page, so you can build a shop before you've connected anything. See Running locally.

Stripe or Square

A site is built the same way on either: site.payments answers the same shapes, so a carrier written for one runs on the other. What differs is what each can sell. Stripe sells subscriptions. Square tracks stock at your location, so what has sold out can't be bought. The comparison has the rest.

Payments is included with Pro ($15/mo) and White Glove. To start, choose Connect beside Payments in your site's Overview, or read the Payments docs first.

In the future, we will add more providers, and the beauty of this design is that the entire flow is processor-agnostic, keeping our promise to be as lock-in-free as possible across the stack. Let us know if we're missing one you'd like to use and we'll prioritize!

Nine new templates

The template gallery grew this month:

  • Café and Food Truck: hours, menus, and where the truck is parked this week.
  • Sessions, for wedding and portrait photographers with packages to book, and Series, for photographers who work in long projects.
  • Liner Notes, for a record release with its tracks and credits, and Repertoire, for ensembles that play weddings and events.
  • Case Studies, a project-led portfolio for designers.
  • Tech Product, a product site with features, how-it-works steps and an FAQ.
  • Byline, a magazine-style blog with authors and tags.

Each one is a full site you can build on. Pick one in the editor and make it yours.

Edit your sites from Claude

In August, Claude learned to build new Archival sites. Now it can edit the ones you already have. In any Claude chat with the Archival connector, ask for something like:

Add a post to example.com about this weekend's show.

The first time, Claude shows a Connect button that signs you in to Archival. After that, it can reach every site you own or collaborate on.

This is another great example of how building with WASM-first has enabled some really clean workflows. In this case, it's relevant because our MCP server is actually running an editor client on the edge, so it has all the same capabilities as our full featured editor client, just exposed as tools/endpoints rather than events.

Setup is in Building with Claude.

Your site on Bluesky

Sites hosted on archival.dev can now be accounts on the AT Protocol, the network Bluesky runs on. The site hosts its own account, its handle is its domain, and people follow @example.com from Bluesky or any other ATProto app.

We've long believed at Archival that a domain is a really nice abstraction for identity, that sidesteps two conflicting needs: one, legal and trust attribution for source, and freedom of speech and pseudononymity required for important journalism and opinion. On social platforms, since they own the identity layer, they effectively have to resort to state-level surveilance and identity (Facebook) or resign themselves to a nihilistic approach to trust (Reddit) that allows shitposters to run wild. If you have costs and identity associated with a domain, and your posts verifiably come from that domain, we can have the best of both worlds. Your registrar can still be subopena'd, but you retain maximally legal-friendly identity protection. And if you shitpost, people just distrust all the content from your domain instead of having to build content moderation stacks.

In any case, if you want to start using it today, we handle everything and make it super easy to interface with the ATmosphere. The basic posting mechanism is just to map an object type in archival_editor.toml:

[atproto]

[atproto.objects.note]
content = "text"
published = "date"

and every deploy publishes that content to the ATmosphere. Set type = "Document" for long-form writing, and add a follow list to follow up to ten thousand accounts.

We also support comments and other live info, via carriers, so you can set up simple edge-local servers for handling rich interactive inbound from the ATmosphere. The ATProto docs has lots of additional context.

Sign in to your site from Mastodon apps

Your site's ActivityPub accounts already post to the fediverse. Now you can read and reply from them in the Mastodon app you already use.

Add this to the top of archival_editor.toml:

allow_mastodon_clients = true

Then add a server in Ivory, Tusky, Elk, Phanpy or most other Mastodon apps, and give it your domain. The app sends you to Archival to sign in and pick an account. From there you can read the accounts you follow, and favourite, boost, reply, follow and search.

Following someone from an app edits the follow list in your config, so your site's files stay the record of who it follows. The details are in the federation docs.

Webmentions

Add one line to archival_editor.toml:

[webmention]

and every page of your site accepts Webmentions. When a blog on WordPress, Ghost or micro.blog links to one of your pages, its site tells yours. Archival checks the link and keeps the reply, like, repost or mention. Bridgy turns likes and replies on Mastodon and Bluesky into Webmentions too.

It also works the other way. Map an object type under [webmention.objects] and every link in one of those posts sends a mention to the page it points at.

Your pages are static, so a carrier reads the mentions with site.webmentions and shows them when someone visits.

Updates to our ToS and Privacy policy

Our ToS and Privacy Policy has up to this point been mostly boilerplate. As we onboard more customers, it made sense to me to make sure that our ToS and Privacy documents reflected our ethos more directly. Today I've added a "Your Content" section to each, which guarantee that when you put your site on Archival infra, you do not release any ownership of it, and we can't use it, sell it, or train AI with it.

In the future, we might reach out to some of you for permission to do things like this (mostly just using your sites in marketing campaigns and the possibility of fine-tuning our LLMs using your sites in addition to our own training sets) - but we'll never do this without asking.

Archival continues to be the easiest way to host your own website, and we think that if we can use your stuff without your permission, it's not really yours. We hope that this subtle but important differentiation will make it easier to build on our platform instead of the extractive ones.

As always, all our site edits are public, so you can see the full diff of what changed here: https://github.com/archival-dev/archival-docs/commit/be995cae2e046227e8406f29c8fc59af6c5cff8c

A database for your site

Every site now has its own SQLite database, site.sql. Every carrier on the site shares it, and it keeps its data between requests and deploys. It's good for sign-ups, counters, RSVPs, and anything else small and live.

await site.sql.exec(
  "INSERT INTO signups (email, at) VALUES (?, ?)",
  body.email,
  new Date().toISOString(),
);

It comes with carriers v2 and is included with Pro. See Storing data for the details.

Carriers v2: a database and schedules

Carriers, Archival's serverless functions, have a new version. Add "archival": { "carrier": 2 } to a carrier's package.json and it gets a fourth argument, site, with interfaces for social, sql, and payments. This will be a place for platform-level APIs in general, so the API can stay stable in the future and we no longer augment the object namespace.

Carriers can also run on their own now. Put a cron expression beside the version, export scheduled, and the carrier runs on that schedule:

"archival": { "carrier": 2, "schedule": "0 * * * *" }

The carrier build toolchain is on npm now, so carriers build the same way in archival run as they do when deployed. Carrier API versions covers moving a v1 carrier over in three steps.

Archival.dev now encrypts secrets

Archival recently introduced a 'secrets' type - the archival rust lib and CLI just treats these a little differently than other strings, in that it refuses to render them but otherwise they're the same as strings.

The reason for this introduction was to allow (via carriers) the use of privileged operations without exposing secrets on the client - for instance, I use this at my bar to read and write to a google sheet via a service account, which allows guests to book directly into our host sheet.

However it bothered me that the use of these secrets meant that you really needed to make sure your site repo was never public. I'd much prefer to share my site repos with the world, but as soon as a secret was introduced, I'd need to close the source since there would be plaintext secrets in git.

As of today, that tradeoff is no longer necessary. Archival automatically encrypts all secrets before writing to backing git repos, and decrypts values when editing - so you can interact with secrets just like before, but public repos will only have encrypted values for secrets, which can't be read without the editor.

This is another example of how separating content from presentation can be very powerful. Having strong types for these values means that we could make this change without introducing a new API or requiring configuration.

After I clean out my repo history or rotate my service account keys, I'll be able to make my restaurant site's repo public, so other folks can take a look at how to build a robust reservation system entirely on Archival and google sheets.

Site analytics in the editor

The Archival analytics widget for nice-dream.com: 333 visitors, up 66%, and 5,379 pageviews over the last 30 days, above a line chart of daily visitors

Every site on Pro now has an analytics view in the editor. Click the sparkline beside a site, or Open Analytics in its settings, to see visitors, pageviews, bounce rate and time on site, each compared with the period before.

Below that are your top pages, referrers and UTM campaigns, countries, devices and browsers, and your Core Web Vitals.

Analytics, like email, is a feature that has historically been decoupled, isolated, and an additional expense to your site for something that feels like table stakes, so we include it and enable it automatically for free.

This also solves for a long-standing problem with analytics and visibility, which is that running analytics from a domain owned by a third party means it gets blocked as if it were an ad, and you will need to show cookie banners to your customers so that google can steal their data. Running this stuff yourself means it's privacy friendly but still allows you the basic insights that our customers generally want, like "where are my visitors coming from" and "how many people are visiting".

Once our iOS/Mac app is approved, you'll get a cool little analytics widget for your sites too, which I've really been enjoying testing.

We're Federated!

Archival recently got the ability to really easily add activitypub to a site. As you can see on this site's public github repo, you can simply map an object type (or ask task mode to do it for you) to the activitypub fields, and we'll automatically detect this and set up the webfinger endpoint and the other activitypub endpoints needed to federate your posts to various platforms.

When you enable it, your site is its own Mastodon-compatible instance: it answers WebFinger, NodeInfo and Mastodon's instance API on your own domain, so your handle is @you@yourdomain.com and every other server talks to your site directly.

For instance, with just this config, this post and the other updates can now be read via rss and on various federated social feeds. For instance:

These all will now sync up with the updates on this site, along with hundreds more.

It works in both directions, too. Your site accepts follows, and keeps the likes, boosts and replies your posts get, so you can set up carriers that read them through site.activitypub and show live replies and like counts on your own pages. You can also like, boost and reply as your site from the editor, or turn on allow_mastodon_clients and do it from Ivory, Elk or any other Mastodon app. The federation docs have the rest.

Want to own your data and still have social links to follow and share? Now you can on Archival!

Archival 0.22.0

Archival 0.22.0 is released, with a few small quality of life fixes as we push towards 1.0


Comment clobbering

archival format no longer deletes comments in archival files (although writing to objects via the editor still will - keep comments in object definition files!)

Slug Addresses

It felt non-intuitive that we couldn't address objects by their slug, since we have root object access that way. This enables things like {{ posts.something.name }} where something is the object file at objects/post/something.toml - note that if the slug has dashes, you have to use bracket syntax ["my-post"], which shouldn't be a surprise but is worth noting. This is especially useful when looking up fields, since that used to be:

{{sample_menus | where: "slug", "lunch" | map: "url" | first }} to get the URL, which not only is hard to read but has to map the whole array. That now condenses to {{ sample_menus.lunch.url }}, which I'd hope would be the first thing you'd think of.

Build an Archival site from Claude

Archival now speaks MCP, so an assistant can author a site end to end. It writes the object files and templates, builds them against a pinned archival binary on our side, and hands back a preview URL you can look at and react to.

Build errors come back as tool output, which means the assistant can fix its own templates.

See Building with Claude for setup.

Editor autocompletion for object files

Add the schema comment to the top of your archival_objects.toml:

#:schema https://archival.dev/schemas/archival_objects.schema.json

Your editor will complete field types, flag a definition that can't build, and explain the reserved keys inline. The same schemas are in the SchemaStore catalog, so most editors pick them up with no comment at all.