Smeltery
Get started

Getting started

v0.1

Pages and CSS

A new web app opens on a welcome page and has styled log-in, register, password-reset and dashboard pages, in light and dark (following the system setting), with no JavaScript besides Sparks (and Alpine.js when chosen). They use a compiled public/assets/css/app.css that ships with the app, so they look the same without any tool installed. It is built from resources/css/app.css (the theme colours and the component classes btn-primary, btn-secondary, form-input, form-label, form-error, panel, link, alert-success, alert-error) and from the classes in the view templates, including the views the make:* generators write. In an app, Tailwind reads the classes in resources/views/ and app/ (the @source lines of resources/css/app.css); other folders are not scanned.

To change the CSS, Smeltery runs the Tailwind CSS standalone binary. smeltery new downloads it (Tailwind v4.3.3, about 110 MB, over HTTPS from GitHub, checked against its SHA-256) into a per-user folder: %LOCALAPPDATA%\smeltery\bin on Windows, ~/Library/Application Support/smeltery/bin on macOS, and $XDG_DATA_HOME/smeltery/bin or ~/.local/share/smeltery/bin elsewhere; smeltery tailwind:install does the same for an existing app. The binaries exist for Linux (x64 and arm64, glibc and musl), macOS (x64 and arm64) and Windows (x64). smeltery serve and smeltery build use TAILWIND_BIN when it is set, then that binary, then tailwindcss in a folder on PATH given as an absolute path (empty, . and other relative entries are skipped). Before they run the per-user binary they check it again: its SHA-256 (a .verified stamp file next to it skips the hashing while the binary's size and modification time stay the same) and, on Linux and macOS, that the binary, its folder and smeltery/ belong to the user and are not writable by the group or others, and that the data folder above them is not writable by others. A binary that fails is not run (a warning names the reason), and smeltery tailwind:install replaces it. When the download fails, the app is created anyway with its prebuilt CSS, and the summary shows smeltery tailwind:install to retry.

↑↓ moveEnter openEsc close