Skip to content

Recipes ​

Each recipe is a whole task, written as the files of a small project. Every file is checked by the compiler when the site is built, so each one compiles as shown. Start a project with weft new (Get started) and copy in the files a recipe needs.

recipewhat it shows
A form with validating typesone type that checks a field as you type and again on the server
A list with live dataa list kept in std/db, shared by everyone, kept fresh on every screen
Signing inaccounts with passwords, a session, server functions only the signed-in may call, an admin role
A server endpointa typed JSON endpoint from a file, and a router in code with middleware
A desktop windowa component in its own window, sized by the window and following its colour scheme
User-editable pagesusers write their own home page, checked when they save it, served over the app
Find and replace with regular expressionsparsing log lines, slugs and dates with std/regex, and patterns from users
Verify a Stripe webhookchecking a webhook's HMAC signature in constant time, and issuing and verifying JWTs
Stream LLM tokens to the browsera model's answer relayed token by token with sse, and a page that shows it as it arrives
A script with files and programsweft run scripts reading and writing files, running programs, reading standard input

Weft is in development. The reference is the spec as it stands today.