Skip to content

Build modules

Hearth is SDK-first. New modules should be added as web SDK modules unless there is a strong reason to keep them outside that path.

Use the generator for the fast path, or add a module file manually under apps/web/src/modules/sdk.

Modules declare a manifest, settings schema, optional data schema, runtime component, and optional admin settings panel.

If a module needs secrets or provider calls, move those concerns to the server and consume a server route from the module.

  • Auto-discovery is handled by the web registry.
  • Use useModuleQuery for polling and useModuleStream for SSE.
  • Keep provider secrets and private feed URLs server-side.
Terminal window
pnpm create-module