Reference

Surface

webfluid.surface — the frontend layer: serving the UI, plus the bundled Node and Tailwind tooling that drives it. Most of this you reach through config and the CLI rather than directly.

Frontend

from webfluid.surface import Frontend — the object that covers an app or Additive with a frontend.

  • cover_fluid(fluid) / cover_additive(additive) — attach a frontend to the main app or an Additive (driven by APP_FRONTEND / the Additive manifest's frontend).
  • include() — the markup injected by the template frontend() helper (htmx / Alpine / Tailwind link).
  • vite() — the served Vite index, rewritten for HMR in debug.
  • Frontend.prepare(fluid) — wires the dev-server proxy (debug) or the build-and-mount flow (production).

Configuration helpers

  • setup_frontend(project) — downloads htmx/Alpine, the create-vite templates, Node and Tailwind, and writes the root package.json and orchestrating vite.config.js.
  • validate_frontend_config(dict) — validates an APP_FRONTEND / manifest frontend block (types: none, htmx, vite).
  • dist — the surface's tooling directory (where Node, Tailwind and templates are cached).

Node tooling

  • load_node(download_fn) — ensures a Node runtime (system or downloaded standalone).
  • node_cmd(cmd, cwd) — run a Node/npm command (raises NodeError on failure).
  • node_proc(cmd, cwd) — spawn a long-lived Node process.
  • CLI: wf node -- ....

Tailwind tooling

  • load_tailwind(download_fn) — ensures the standalone Tailwind CLI.
  • generate_tailwind_css(fluid) — compile every tailwind_raw.css in the app (and framework) on startup.
  • generate_tailwind_asset(in, out, cwd) / tailwind_cmd(args, cwd) — lower-level compile / passthrough.
  • CLI: wf tailwind -- ....

Continue reading

From here you can continue straight with Additives.