Skip to main content

Search

Items tagged with: Kitten


The new and improved Settings section for Kitten (Small Web/peer-to-peer web) apps is coming along nicely.

Should be live this week.

#Kitten #SmallWeb #Settings #SmallTech #p2p #peerToPeer #web #dev


Also, not immediately relevant to your current issue but something that might be worth considering for the future: using the htmx websocket extension, you can basically implement a streaming HTML approach (example using Kitten: https://ar.al/2024/03/08/streaming-html/) where you can just stream errors to the page as they happen.

#htmx #webSocket #Kitten #SmallWeb #StreamingHTML #errorHandling (2/2)


Sitting outside on a rare sunny day at a lovely pub in Bray, refactoring Kitten* to pull out the settings page sections into their own pages (and use Kitten’s new Streaming HTML workflow**) and enjoying a yummy pint of Tundra IPA.

No complaints :)

* https://codeberg.org/kitten/app
** https://ar.al/2024/03/08/streaming-html/

#Kitten #SmallWeb #Bray #Ireland


The Evergreen Web section in Kitten’s¹ settings now has its own page too (and uses Kitten’s new Streaming HTML² workflow).

If you have the previous version of your site up somewhere, you can use the 404-to-307 technique³ to forward missing pages to your old site so as not to break the Web.

I’ll add local static archive support later.

¹ https://codeberg.org/kitten/app
² https://ar.al/2024/03/08/streaming-html/
³ https://4042307.org

#Kitten #SmallWeb #EvergreenWeb #StreamingHTML #web #dev #NodeJS #JavaScript


That feeling when you open the silly little collaborative drawing app you made and you find that some folks made this.

https://draw-together.small-web.org

PS. If you want to learn how the app was made, here’s a video tutorial using Kitten¹: https://ar.al/2024/03/26/draw-together/

¹ https://codeberg.org/kitten/app

#FreeGaza #BDS #protest #keffiyeh #Israel #Palestine #Gaza #settlerColonialism #apartheid #ethnicCleansing #genocide #SmallWeb #Kitten #DrawTogether


Lots to do yet but the new Kitten¹ settings section (that’s common to all Kitten apps / Small Web places) is coming along nicely. (With the general style/layout borrowed from Domain².)

(It’s currently a single page and I’m breaking it up into multiple ones because it’s time.)

Once I’m done with this I should really record a screencast of Kitten’s new backup and restore feature/data portability.

¹ https://codeberg.org/kitten/app
² https://codeberg.org/domain/app

#SmallWeb #Kitten #Domain #SmallTech #web #dev


:kitten: Meow! New Kitten just dropped:

• Uploads are now listed in the Small Web Place Settings (/💕/settings) of all Kitten apps.

#Kitten #SmallWeb #SmallTech #uploads #settings #web #dev


… JSDB, by the way, is short for JavaScript Database, which is, umm, a JavaScript database.

It’s an in-process, in-memory database for Node.js for Small Web use that persists to an append-only JavaScript – not JSON, JavaScript – transaction log.

JSDB’s very easy to work with because you just use native JavaScript objects and they just automatically get persisted for you.

e.g., Here’s a quick 6-line Kitten app that persists a counter:

https://codeberg.org/kitten/app#using-javascript-database-jsdb-a-not-so-scary-database

#JSDB #Kitten #SmallWeb #web #dev


Just deployed a new version of Kitten.

It uses the latest version of JSDB (5.1.3) which fixes an issue where instances of `EventEmitter` subclasses persisted to the database were erroneously persisting their (by convention private) `_events` arrays containing `AsyncFunction` instances and thereby causing a crash on the database open attempt when the `AsyncFunction` class could not be found as it wasn’t provided to the `JSDB.open()` method.

https://codeberg.org/kitten/app

:kitten: 💕

#Kitten #SmallWeb


Just published a minor update (version 5.1.1) to JavaScript Database (JSDB) that optimises the custom data type¹ serialisation code by removing a redundant return statement:

https://www.npmjs.com/package/@small-tech/jsdb

This change is backwards compatible and shouldn’t require and updates to your projects, including the ones you have in Kitten (which uses JSDB internally).

¹ https://codeberg.org/small-tech/jsdb#custom-data-types
² https://codeberg.org/kitten/app

#JavaScriptDatabase #JavaScript #database #JSDB #Kitten #SmallWeb #NodeJS #web #dev


Just deployed a new Kitten¹ version 🎉

• Adds database backup and restore in your app’s Kitten settings page (/💕/settings)

• Upgrades version of JSDB from 4 to 5²

• You can emit and listen for events on the session object you get from `request.session` in your routes now.

¹ https://codeberg.org/kitten/app
² For migration notes, please see: https://codeberg.org/small-tech/jsdb#migrating-from-earlier-versions-of-jsdf

#Kitten #backupAndRestore #JavaScript #NodeJS #database #JSDB #sessions #SmallWeb #web #dev


🎉 Got database backup and restore working in Kitten (so every Kitten app gets it for free) and, with the new JSDB 5 support in Kitten, you can now make your model classes EventEmitters.

The session object is now an EventEmitter so you can now listen for events on the current session. In fact, I did just that in Kitten itself to implement the upload of the backup file during the restore process to make the Streaming HTML handler get notified once the POST route has the upload.

#SmallWeb #Kitten


Watching The Doors live at The Hollywood Bowl (1968)¹ and hacking on Kitten² and Domain³.

All in all, not a bad way to spend a Saturday afternoon in my book.

(I’ve almost got database backup/restore working in Kitten and I’ve just finished porting Domain to the latest Kitten with JSDB 5⁴.)

¹ https://yewtu.be/watch?v=Q76QBhKHQGc
² https://codeberg.org/kitten/app
³ https://codeberg.org/domain/app
https://codeberg.org/small-tech/jsdb

#TheDoors #Kitten #Domain #JSDB #SmallWeb #web #dev #music



Heads up for anyone playing with Kitten:

When the backup and restore branch lands, there will also be a breaking change to the Streaming HTML workflow.

Currently, when you expose an `onConnect()` handler, Kitten automatically adds `hx-ext='ws'` and `ws-send` attributes to your forms. Going forward, it will only add the former.

You’ll have to add `ws-send` (or Kitten’s syntactic sugar, `connect`) manually.

This is to allow hybrid workflows.

e.g.,

https://codeberg.org/kitten/app/src/branch/backup-and-restore/examples/streaming-html/file-uploads

#Kitten #SmallWeb


This is a niche one and will likely not affect any of the (three?) people playing with Kitten¹ right now but, in any case:

If you persist custom types to your Kitten database, you might be hit by this bug that was introduced when I released versions of Kitten with minified identifiers.

I briefly wrote about what happened, how you can identify if you’re affected, and how you can fix it here:

https://codeberg.org/kitten/app/issues/160#issuecomment-1775375

¹ https://codeberg.org/kitten/app

#SmallWeb #Kitten #web #dev #JSDB #JavaScript


Coming soon, views of your databases in your Kitten* app’s Settings page (/💕/settings) pages. And, after that, data export and import.

* https://codeberg.org/kitten/app

#SmallWeb #Kitten #data #databases #JSDB


@laguiri Because we’re clearly not getting funded from the EU/ngi/NLNet:

https://ar.al/2022/10/20/nlnet-grant-application-for-domain-rejected/

https://ar.al/2022/07/29/nlnet-grant-application-for-domain/

https://ar.al/2022/09/28/nlnet-grant-application-for-domain-first-update-questions-and-answers/

#SmallWeb #Domain #Kitten #Place #funding #EU #NLNet #NGI #Horizon2020


(If you’re wondering why the repository was 176MB to begin with, it’s because I was initially deploying from the /dist folder in the repository. But since then I created a special deployment site for Kitten and now Kittens come from, well, where else but https://kittens.small-web.org.)

:kitten: 💕

PS. It takes me ~3.5 seconds to build and deploy a new version of Kitten so its common for there to be multiple new versions in a day. Run `kitten update` to get the latest.

#SmallWeb #Kitten #web #dev


If you’re working on Kitten¹ from source, please clone a fresh copy.

I just rewrote history to reduce the repository size (correctly this time, including all references from branches, tags, etc.).

The good news is that – contrary to what the Codeberg interface is currently showing the size to be (176MB) – the repository is only about 5MB now so it should only take a couple of seconds to clone.

Related issue: https://codeberg.org/Codeberg-e.V./requests/issues/182

:kitten: 💕

¹ https://codeberg.org/kitten/app

#Kitten #dev #git