Svelte + Phoenix with pluggable render modes.
CaravelaSvelte lets you mount the same Svelte component over two
different transports, chosen per route:
:live — LiveView WebSocket (diff-based, real-time). This is
today's live_svelte story.:rest — Inertia-style HTTP (first-load HTML + SPA navigation
over JSON). Cacheable, offline-tolerant, no persistent socket.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
:live mode reference:rest mode reference — router, controller,
client helpers, SSE real-time, polling fallbackPhase 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.
live_svelteCaravelaSvelte is a fork of live_svelte by Wout De Puysseleir. See NOTICE.md for attribution and UPSTREAM.md for the sync policy.
MIT — see LICENSE.