Skip to main content

Search

Items tagged with: Kitten


🎉 You can now use components and fragments in your Markdown pages in Kitten.

Following on from yesterday’s Markdown pages feature, you can now import components and fragments and use them in your Markdown pages to add dynamic functionality (similar to how it works in mdx but without using JSX).

(The “SCARY” text in the screencast is being randomly animated by a component.)

Enjoy!

:kitten:💕

#Kitten #SmallWeb #Markdown #components #fragments #mdx


🎉 New Kitten feature: Markdown pages

You can now create .page.md files and use front matter to specify a layout template as well as any other props you want to pass to your layout.

(I’m working on the Kitten web site with docs, etc., so I thought I’d bite the bullet and add this feature this morning to make my life easier. Should make it easier to make this sort of site with Kitten in the future for everyone.)

https://codeberg.org/kitten/app

:kitten: 💕

#Kitten #Markdown #SmallWeb #web #dev #NodeJS


w00t! 🎉 #Kitten now has a shiny new…

kitten shell

…command you can use to connect to your Kitten daemon in production to debug it, etc.

Also, I don’t know if I missed something simple but I had a hard time handling Node’s #REPL preview completions over a socket connection. Couldn’t find any docs. Managed to fix it by implementing a control channel to communicate the remote client’s terminal size. Wrote it up here, in case it helps anyone else:

https://codeberg.org/aral/gists/src/branch/main/node-js-repl-over-socket-with-preview-completions.md

:kitten:💕

#NodeJS


You can now connect to the interactive shell (REPL) of a Kitten daemon running in production by sshing into your machine and running:

telnet 127.0.0.1 1337

(Or nc 127.0.0.1 1337 if you prefer. Basically, it is available from port 1337 on the local loopback address.)

In development mode, you can press the s key to start up an interactive shell.

:kitten:💕

https://codeberg.org/kitten/app

#Kitten #SmallWeb #REPL


A good to place install command-line apps on Linux is $HOME/.local/bin

Sadly, Linux distributions don’t consistently have that folder on their system paths.

So I wrote up a quick gist with instructions on how to add it to your path on common Linux shells:

https://codeberg.org/aral/gists/src/local-bin-path.md

(If yours isn’t listed, merge request are welcome.) ;)

Kitten also now warns you if it detects its not on your path with a link to that gist during installation. (https://codeberg.org/kitten/app/issues/178)

:kitten:💕

#linux #Kitten


Note that when you’re working with Kitten, your apps do not have a build process.

You write HTML, CSS, JavaScript and, optionally, extend using first-class support for htmx and alpine.js as well as Kitten’s own Streaming HTML workflow¹. There’s also no scaffolding or generating a project with hundreds of files or anything. You just write the code for your app.

¹ https://ar.al/2024/03/08/streaming-html/

#SmallWeb #Kitten #StreamingHTML #web #dev #NodeJS #JavaScript #HTML #CSS


So Kitten’s build process (i.e., the time it takes to build Kitten itself) takes ~0.7 seconds on my ~1 year old desktop (Ryzen 7 5700G 3.8Ghz) vs ~1.4 seconds on my ~3-year-old Starlabs LabTop (renamed to the Starbook thanks to a suggestion by yours truly but sadly, not quickly enough).

So, in summary, it’s bloody fast for something that results in a ~9MB bundle.

(And that’s all thanks to esbuild.)

https://codeberg.org/kitten/app

#Kitten #SmallWeb #build #performance #web #dev


A little detail in the latest #Kitten:

I find #NodeJS deprecation warnings hit the sweet spot between jarring enough to be annoying and not informative enough to be useful.

So, in Kitten, the first time you hit a deprecation warning, you get a message telling you there are deprecation warnings.

If you care, you can open the interactive shell and view the `kitten.deprecationWarnings` list, which will show you full details including the stack trace.

:kitten:💕

#SmallWeb #design #layering


I still prefer the Kitten version ;)

(That’s _all_ the code for a _persisted_ counter.) :)

https://ar.al/2024/05/23/new-kitten-features-interactive-shell-repl-multi-page-settings-and-backup-and-restore-data-portability/

#Kitten #SmallWeb #web #dev #html #css #javascript #NodeJS


:kitten: 💕

New Kitten update!

Mostly housekeeping:

• Runtime is now Node 22 (22.1.0 as 22.2.0 has a bug that can crash on deprecation warnings). This might be a breaking change for your code (e.g., import…assert is now import…with, etc.) Remember, Kitten is pre-release/not API-versioned yet.

• Applied all semver-compatible dependency version upgrades.

• Fixed tests & coverage. Tests are still woefully inadequate but will improve.

https://codeberg.org/kitten/app

#Kitten #SmallWeb #NodeJS #web #dev


Hey @aral, we have been talking a bit about you and #Kitten here at p4p in #Berlin!

I would love to play around with Kitten, but I don’t really know where to start, since I get easily overwhelmed, my attention span is super limited, and my technical knowledge even less…

Do you have an intro/howto video?


Kitten bugfix release:

Please upgrade to the latest release that fixes a regression introduced into sessions object with the latest JSDB¹/JSDF² upgrade:

https://codeberg.org/kitten/app/issues/177

Persisting arbitrary objects to sessions is a supported workflow and this regression broke that.

e.g., See the Kitten Count Sessions example: https://codeberg.org/kitten/app/src/branch/main/examples/kitten-count-sessions/index.page.js

:kitten:💕

¹ https://codeberg.org/small-tech/jsdb#javascript-database-jsdb
² https://codeberg.org/small-tech/jsdb#javascript-data-format-jsdf

#Kitten #SmallWeb #web #dev #sessions #JSDB #JavaScript #database #regression


New Video – Kitten features introduced this week:

• Interactive Shell (REPL)
• Multi-page Settings
• Backup and restore (data portability)

With examples that cover components and Kitten’s built-in JavaScript database (JSDB).

https://ar.al/2024/05/23/new-kitten-features-interactive-shell-repl-multi-page-settings-and-backup-and-restore-data-portability/

:kitten:💕

#Kitten #SmallWeb #SmallTech #web #dev #JavaScript #HTML #database #JSDB #components #settings #dataPortability #REPL


So! Many! Kittens!

(Going to record a demo of the new interactive shell – REPL to some – and multi-page Settings this afternoon, just planning it out now.)

Oh and is that me creating and calling web routes interactively in the REPL on a live server? Why yes, yes it is.

:kitten:💕

#Kitten #SmallWeb #web #dev #HTML #CSS #JavaScript #NodeJS


:kitten: Kitten’s interactive shell (REPL) now saves session history scoped to your app so it will still be there when you next serve the same app.

https://codeberg.org/kitten/app#kitten-s-interactive-shell

I think I’m done with the REPL feature now.

Going to take a little break, step away from the computer, and make a plan for the next week of work on Kitten and Domain¹.

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

#Kitten #SmallWeb #REPL #shell #JavaScript #NodeJS #web #dev #SmallTech


Small update on Kitten’s new interactive shell (REPL). You can now access Kitten’s router via:

kitten.app.router

Also updated the section in the tutorial to fix typos in some of the code examples and use the new router key path:

https://codeberg.org/kitten/app#kitten-s-interactive-shell

:kitten:💕

#Kitten #SmallWeb #REPL #shell #NodeJS #web #dev #router


:kitten: 🎉

Kitten now has a lovely new multi-page Settings screen and… *drumroll*… a new 🐢 interactive shell (REPL) for you to play with the running state of your Small Web site/app/place and debug your app, inspect/manipulate its database, etc.

I plan on recording demos of each of them tomorrow but you can play with them now.

And here’s a little tutorial to get you started with the shell:

https://codeberg.org/kitten/app#kitten-s-interactive-shell

💕

#Kitten #SmallWeb #SmallTech #NodeJS #REPL #JavaScript #HTML #CSS #web #dev


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