cd /news/large-language-models/safsaf-a-web-framework-for-guile · home topics large-language-models article
[ARTICLE · art-22999] src=cbaines.net pub= topic=large-language-models verified=true sentiment=· neutral

Safsaf – A Web Framework for Guile

Christopher Baines released Safsaf, a new web framework for Guile built on Guile Fibers and the Guile Knots web server, drawing from his seven years of experience developing Guix-related services. The framework, approximately 1,800 lines of code, features a declarative routing system that treats routes as data for introspection and middleware application, while deliberately omitting database support and MVC patterns. Baines developed Safsaf using Claude Code with Claude Opus 4.6, acknowledging ethical concerns around LLM-assisted coding but citing limited motivation and a desire to accelerate development for existing and future projects.

read3 min publishedJun 5, 2026

Background #

Over the past week or two I've been working on a new web framework for Guile. This is based on the knowledge I've accumulated over the past 7 years working on things like the [Guix Data

Service](https://codeberg.org/guix/data-service), [Guix Build
Coordinator](https://codeberg.org/guix/build-coordinator) and [Nar
Herder](https://codeberg.org/guix/nar-herder), but also based on their

code, as I've used Claude Code running Claude Opus 4.6 to build this

(a large language model). I've been hesitant to try coding with LLMs so far, I still think there's plenty of reasons to be, and others have done much more thinking about LLMs and the ethical and legal implications of using them to write software.

This blog post definitely isn't an argument for using these tools, but my "excuse" if you call it that, is that I wanted a Guile web framework to both use for existing and new projects, and this was an approach to get there faster and with the limited amount of motivation I have at the moment.

Introducing Safsaf #

[Safsaf](https://forge.cbaines.net/cbaines/safsaf), or Guile Safsaf
if you prefer, is a web framework for Guile, built around using
[Guile Fibers](https://codeberg.org/guile/fibers) and the [Guile

Knots web

server](https://cbaines.codeberg.page/guile-knots/#knots_005fweb_002dserver). It's only ~1800 lines of code, and the largest part is the router, deciding which handler should respond to requests. The Guix Data Service handled routing using match

on the method and path components, and this works pretty well, but for a long while I've wanted a more declarative approach to routing. One where the code could introspect the routes and generate links or even API specifications.

Another important property of having routes as data is that it allows applying handler wrappers to the routes and the handlers that they reference. This is the model that Safsaf uses for middleware or functionality that you want to apply across some or all of the web service. Safsaf comes with a number of useful handler wrappers and functionality like logging and exception handling is implemented as handler wrappers.

I think it's also important what's not included. In comparison to GNU Artanis (which I did try using for the Guix Data Service many years ago), there's no inbuilt support for talking to databases, database migrations, a Model View Controller design or file based templates, and for all these things, I don't currently see a good reason to include support for them.

I would like to look at what can be included for internationalization support, as I think that's important. I'd also like to look at what's required for Server Sent Events (SSE) and WebSocket support, particularly as the Build Farm Front-end (BFFE) uses Server Sent Events.

The Safsaf Git repository includes a couple of example apps which you can run, a paste-bin and a [blog

site](https://forge.cbaines.net/cbaines/safsaf/src/branch/trunk/examples/blog-site). There's inevitably some issues with the code, and there's probably some issues with the design as well, but my hope is that this is a good starting point.

If you have any comments or questions, please reach out to me via
email at [mail@cbaines.net](mailto:mail@cbaines.net), raise an issue
on [Forgejo](https://forge.cbaines.net/cbaines/safsaf), or contact me
on the [Fediverse](https://gts.hotaircat.net/@cbaines).
── more in #large-language-models 4 stories · sorted by recency
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/safsaf-a-web-framewo…] indexed:0 read:3min 2026-06-05 ·