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.
Key Points
Section titled “Key Points”- Auto-discovery is handled by the web registry.
- Use
useModuleQueryfor polling anduseModuleStreamfor SSE. - Keep provider secrets and private feed URLs server-side.
Scaffold a new module
Section titled “Scaffold a new module”pnpm create-module