#PeerToPeerWeb

2025-05-26

šŸ‘‹šŸ¤“ Goodbye Site.js, Hello Kitten!

I started working on creating a Small Web¹ server (a peer-to-peer Web server) six years ago² with Site.js.

Building Site.js was my first attempt. And it resulted in:

• Auto Encrypt (automatic Let’s Encrypt certificates): codeberg.org/small-tech/auto-e

• Auto Encrypt Localhost (automatic localhost TLS certificates): codeberg.org/small-tech/auto-e

• @small-tech/https (drop-in Node.js https module replacement with automatic TLS certs everywhere): codeberg.org/small-tech/https

• JSDB: In-process, in-memory JavaScript database that persists to append-only JavaScript logs: codeberg.org/small-tech/jsdb

As Site.js reached an evolutionary dead-end, and as I learned from my experiements with replicated data types that replicated data types are *not* a prerequisite for a decentralised web (actual topological decentralisation and ease of use are), I started writing a new server/platform called Kitten from scratch while still making use of the tried and tested modules listed above.

Last week, I switched over our last site using Site.js to Kitten and, with that, today I’ve sunset³ Site.js:

sitejs.org

For its successor, please see Kitten:

kitten.small-web.org

If you want to support our work at the Small Technology Foundation, please consider becoming a patron:

small-tech.org/fund-us

:kitten:šŸ’•

¹ ar.al/2024/06/24/small-web-com
² ar.al/2019/08/26/introducing-s
³ Using our instance of Look Over There!: look-over-there.small-web.org

#SiteJS #SmallWeb #SmallTech #peerToPeerWeb #SmallTechnologyFoundation #AutoEncrypt #AutoEncryptLocalhost #JSDB #JavaScriptDatabase #https #TLS

Detail of Site.js web site:
Illustation of woman lying down with laptop. On screen is a twig with two green leaves.

Site.js
Small Web construction set.
Site.js is deprecated and no longer being actively maintained. Much of it lives on in Kitten.
2025-04-28

New Kitten Release 🄳

• New: Any attributes present in a <markdown> tag are now passed to the first rendered element. (This is useful if you want to add some quick inline styles to a <p> that’s rendered from markdown, etc., but for anything more complicated, you should likely just jump into HTML.)

To learn more about Markdown in Kitten, please see the Markdown reference¹.

Enjoy!

:kitten:šŸ’•

¹ kitten.small-web.org/reference

#Kitten #SmallWeb #PeerToPeerWeb #KittenRelease #markdown #web #dev

2025-04-28

New Kitten Release šŸŽ‰

• Fix: morph attributes¹ now support interpolated values.

kitten.small-web.org

Enjoy!

:kitten:šŸ’•

¹ The morph attribute is Kitten’s shorthand for the hx-swap-oob attribute of htmx, which Kitten uses – and extends – under the hood. To learn more about it, see Kitten’s Streaming HTML tutorial: kitten.small-web.org/tutorials

#Kitten #SmallWeb #PeerToPeerWeb #KittenRelease #htmx #hypermedia #web #dev

2025-04-28

New Kitten Release šŸŽ‰

kitten.small-web.org

Added:

• Support for local redirects and domain redirects (former will eventually have interface in Settings, latter can be programmatically used or, more likely, will be used via a small app I’m about to release next).

Fixed:

• Event bubbling in class-based Kitten pages and components is now correctly limited to just the event target if the component’s id starts with Kitten’s automatically generated universally-unique ID for the component.

• Fixed regular expression matching Kitten components in Markdown pages so it correctly captures self-closing components when followed by components with slotted content.

• The Kitten-specific trigger() mixin on the client-side WebSocket now correctly adds the contents of the data attribute on the triggering node to the data property received by the server-side event handler. This gives manually-triggered event handlers the same interface as automatically-triggered ones. (Previously it would create a separate `data` object in the received argument.)

Stay tuned for the a small and useful app release later today for web archiving/combatting link rot :)

Enjoy!

#Kitten #SmallWeb #PeerToPeerWeb #KittenRelease #web #dev

2025-02-08

@networkstring Just a heads up that peer-to-peer Small Web web sites running Place¹ will not be subject this or other similar laws as there is no ā€œuser generated contentā€ on them and each web site merely holds the data created by its owner, who is responsible for the content and with complying with local laws, etc., themselves (and their ISPs and web hosts are responsible in turn, in their local jurisdictions, for the content they host).

What’s the Small Web, you ask?

šŸ‘‰ ar.al/2024/06/24/small-web-com

šŸ’•

¹ codeberg.org/place/app

#SmallWeb #peerToPeerWeb #SmallTech

2025-01-27

A quick demonstration of using the State: Overview page in Kitten’s¹ settings while developing to keep an eye on your event and event listener counts to avoid memory leaks.

Notice how the events and listeners counts change as I navigate between the People and Settings pages in my Place² node and that they are consistent. If they were rising as I navigated back and forth I’d know I had a memory leak somewhere.

If you use Kitten’s built-in features (e.g., the `addEventHandler()` method on your `kitten.Component` subclasses, Kitten will handle adding and removing listeners for you automatically during your component’s lifecycle. You can also do so manually in your component’s automatically-called `onConnect()` and `onDisconnect()` event handlers.

This view is useful during development to ensure you don’t have any memory leaks as pages are loaded and unloaded.

vimeo.com/1050714714

¹ kitten.small-web.org
² Place is in early development at the moment (codeberg.org/place/app)

#Kitten #SmallWeb #SmallTech #demo #developerExperience #developerTools #design #eventModel #events #memory #memoryLeaks #observerPattern #listeners #web #dev #HTML #CSS #JavaScript #NodeJS #server #platform #framework #WebSockets #hypermedia #htmx #StreamingHTML #place #peerToPeer #peerToPeerWeb

2025-01-22

So last night, while recording the preview of Kitten’s¹ improved component model², I made a silly mistake (copying raw HTML into a JavaScript function instead of wrapping it in a kitten.html`` tagged template, easy to do when you’re refactoring to pull out components from pages).

Then, once I figured out what I’d done, I made another one by forgetting to return the value from the function (easy to do when you’re used to using one-line closures as render functions).

I would have caught both of those so much faster if Kitten had helpful error messages for those two pitfalls. And guess what, this morning, it does :)

Attached are screenshot showing the before and after error messages.

Enjoy!

:kitten:šŸ’•

¹ kitten.small-web.org
² Scroll up the thread to watch the video.

#Kitten #SmallWeb #PeerToPeerWeb #web #server #framework #platform #design #usability #errorMessages #authoring #dev #JavaScript #HTML #CSS #htmx #hypermedia #WebSocket #StreamingHTML #SmallTech

Screenshot of first error message (before):

500 TypeError: Cannot read properties of undefined (reading 'match')Screenshot of first error message (after):

Error: Render function did not return kitten.html``

class Count extends kitten.Component {
  html {
    kitten.html`<h1 morph>${kitten.db.counter.count}</h1>`
  }
  onIncrement {
    kitten.db.counter.count++
    this.update
  }
}Screenshot of second error message (before):

500 SyntaxError: Unexpected token '<Screenshot of second error message (after):

500  SyntaxError: Unexpected token '<

(Did you put raw HTML inside a function by mistake instead of wrapping it in a kitten.html`` tagged template?)
2024-10-27

I’m going to present a talk on Small Web at the Dub|Sec meetup this Wednesday (October 30th at 6:30PM). The event takes place at The Camden Court Hotel in Dublin.

Pop by and say hi if you’re around.

meetup.com/dub-sec/events/3038

#SmalWeb #peerToPeerWeb #Ireland #meetup #dublin #dubsec #Kitten #Domain #Place #NodeJS #HTML #CSS #JavaScript #htmx #WebSockets #web #dev

2023-06-20

@shauny I couldn’t agree more. And that requires a rethink of the entire architecture.

ar.al/2020/08/07/what-is-the-s

#SmallWeb #peerToPeerWeb

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst