CaravelaSvelte

Svelte + Phoenix with pluggable render modes.

CaravelaSvelte lets you mount the same Svelte component over two different transports, chosen per route:

Same components. Same prop contract. Same SSR pipeline. Same client bundle. Per-route mode selection.

use CaravelaSvelte.Router

caravela_live "/dashboard", DashboardLive                   # real-time (LiveView)
caravela_rest "/library/books", BookController              # classic CRUD
caravela_rest "/metrics", MetricsController, realtime: true # CRUD + SSE push

Documentation

Status

Phase C.1 — Caravela generator integration. Transports are complete: :live (LiveView) and :rest (Inertia-compatible HTTP) both ship, router macros (caravela_live / caravela_rest) pick per-route, and opt-in SSE real-time for :rest is wired. The caravela_svelte-side enrichment helpers (CaravelaSvelte.Caravela) are live; the matching Caravela generator templates are the in-progress part of C.1.

See the phase plan for the roadmap.

Relation to live_svelte

CaravelaSvelte is a fork of live_svelte by Wout De Puysseleir. See NOTICE.md for attribution and UPSTREAM.md for the sync policy.

License

MIT — see LICENSE.