Vinland

Common Lisp web framework

Read the announcement.

Update #1: now includes a project skeleton! 🎉

Update #2: now with improved error handling and debugging 🐛

Update #3: now includes path generators and route enumeration utilities 🔥

Epic simplicity

  (defparameter *router* (foo.lisp.raven:compile-router
                           `(("/" ,'root)))

  (defparameter *web* (funcall *router* :clack))

  (define-controller 'root
    :method '(:HEAD :GET :OPTIONS)
    :GET (lambda ()
           (negotiate
            ("application/json"
             (set-response-headers :content-type "application/json")
             (demo/json:root))
            ("text/html"
             (flash-now :notice "Your saga starts here.")
             (render :headers '(:content-type "text/html")
                     :view #'demo/html:root))))
    :documentation "Welcome resource, either as HTML or JSON")

Built on Clack

Stop reinventing the wheel. Move logic not specific to your application's domain to reusable middlewares to save time and effort. Harness the synergy of server and framework agnostic solutions to common challenges.

HTTP friendly

Fail early with the semantically correct HTTP response status code when certain conditions are not satisfied, such as when the request has an unexpected HTTP method or media-type. Built-in automatic but overrideable handling of OPTIONS requests.

Extensible

Vinland is built on the Raven router. Define your own sub-protocols as needed, or dispatch to bare Clack handlers when performance is critical.

Familiar

Ships with a plethora of macros and functions to save you keystrokes and minimize HTTP-related shenanigans in your route handlers. Access request parameters, set flash messages, render views, set and remove cookies and session data, perform redirects and content-negotiation, all out-of-the-box.

Minimalistic

Provides some structure and then gets out of your way. Bring your own database and HTML generator.

Open Source

Vinland is made available under the terms of the Apache-2.0 license.

Get involved by opening an Issue or Pull Request on GitHub.

Copyright © 2024 John Newton