You can really get a feel for what authoring a simple web app is like in Kitten (with the latest techniques/features), by checking out the source code for Look Over There!, the multi-site forwarding app with TLS forwarding support that I built recently:
https://codeberg.org/small-web/look-over-there
There’s an instance of it I’m hosting for us at https://look-over-there.small-web.org to forward our archived sites – e.g., https://web0.small-web.org – to archive.org so we don’t break links on the web.
If you want to run it locally, install Kitten (https://kitten.small-web.org) and then type: kitten run https://codeberg.org/small-web/look-over-there.git (you can also clone the git repo manually and just run kitten from the working directory).
Interesting places to look:
• The index page (shows use of a Markdown page that imports and uses Kitten components) https://codeberg.org/small-web/look-over-there/raw/branch/main/index.page.md
• The admin page (notice the lock emoji at the end of the name? That’s all you need to add to a route to make use of Kitten’s automatic authentication. Since every Kitten site/app is protected by public-key encryption and we don’t have the concept of users (each site/app on the Small Web is owned by one person), the whole process can be automated for you. https://codeberg.org/small-web/look-over-there/src/branch/main/admin%F0%9F%94%92.page.js
• The Redirection component. This is what does all the hard work on the admin page. Along with the admin page, they showcase Kitten’s new/alternative (and as-of-yet mostly undocumented) class-based component model with event bubbling on the component hierarchy on the server. (Since this is resource intensive, it’s recommended you use it only when implementing authenticated routes where you’re sure only the site’s owner will be accessing the route.) https://codeberg.org/small-web/look-over-there/src/branch/main/Redirection.component.js
In any case, as Kitten and the rest of the Small Web ecosystem matures further, I’ll be documenting all this better and there will be even more examples and tutorials but, in case you’re one of those inquisitive types and you want to see what web development can be like if you’re *not* building centralised people farming machinery for Big Tech, have a play with Kitten.
:kitten:💕
#Kitten #SmallWeb #SmallTech #SmallTechnologyFoundation #LookOverThere #code #web #dev