Appearance
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.
| recipe | what it shows |
|---|---|
| A form with validating types | one type that checks a field as you type and again on the server |
| A list with live data | a list kept in std/db, shared by everyone, kept fresh on every screen |
| Signing in | accounts with passwords, a session, server functions only the signed-in may call, an admin role |
| A server endpoint | a typed JSON endpoint from a file, and a router in code with middleware |
| A desktop window | a component in its own window, sized by the window and following its colour scheme |
| User-editable pages | users write their own home page, checked when they save it, served over the app |
| Find and replace with regular expressions | parsing log lines, slugs and dates with std/regex, and patterns from users |
| Verify a Stripe webhook | checking a webhook's HMAC signature in constant time, and issuing and verifying JWTs |
| Stream LLM tokens to the browser | a model's answer relayed token by token with sse, and a page that shows it as it arrives |
| A script with files and programs | weft run scripts reading and writing files, running programs, reading standard input |