{"id":47197544,"url":"https://github.com/elixir-volt/phoenix_vapor","last_synced_at":"2026-04-01T17:21:05.792Z","repository":{"id":343995946,"uuid":"1179203196","full_name":"elixir-volt/phoenix_vapor","owner":"elixir-volt","description":"Vue templates as native Phoenix LiveView rendered structs — compile Vue syntax to %Phoenix.LiveView.Rendered{} via Vapor IR","archived":false,"fork":false,"pushed_at":"2026-03-25T05:42:32.000Z","size":335,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-26T10:33:22.597Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elixir-volt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-11T19:46:02.000Z","updated_at":"2026-03-25T05:42:32.000Z","dependencies_parsed_at":"2026-03-15T14:00:54.174Z","dependency_job_id":null,"html_url":"https://github.com/elixir-volt/phoenix_vapor","commit_stats":null,"previous_names":["elixir-volt/phoenix_vapor"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/elixir-volt/phoenix_vapor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-volt%2Fphoenix_vapor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-volt%2Fphoenix_vapor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-volt%2Fphoenix_vapor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-volt%2Fphoenix_vapor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elixir-volt","download_url":"https://codeload.github.com/elixir-volt/phoenix_vapor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-volt%2Fphoenix_vapor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31018542,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-27T03:51:26.850Z","status":"ssl_error","status_checked_at":"2026-03-27T03:51:09.693Z","response_time":164,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-03-13T12:08:06.707Z","updated_at":"2026-03-27T04:01:42.043Z","avatar_url":"https://github.com/elixir-volt.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Phoenix Vapor\n\nVue template syntax compiled to native `%Phoenix.LiveView.Rendered{}` structs via Rust NIFs.\n\n```elixir\ndefmodule MyAppWeb.CounterLive do\n  use MyAppWeb, :live_view\n  use PhoenixVapor\n\n  def mount(_params, _session, socket), do: {:ok, assign(socket, count: 0)}\n\n  def render(assigns) do\n    ~VUE\"\"\"\n    \u003cdiv\u003e\n      \u003cp\u003e{{ count }}\u003c/p\u003e\n      \u003cbutton @click=\"inc\"\u003e+\u003c/button\u003e\n    \u003c/div\u003e\n    \"\"\"\n  end\n\n  def handle_event(\"inc\", _, socket), do: {:noreply, update(socket, :count, \u0026(\u00261 + 1))}\nend\n```\n\nSame WebSocket, same diff protocol, same LiveView client. No wrapper divs, no `phx-update=\"ignore\"`.\n\n## Three tiers\n\n| Tier | What | How |\n|------|------|-----|\n| `~VUE` sigil | Vue templates in any LiveView | `~VUE\"\"\"\u003cp\u003e{{ count }}\u003c/p\u003e\"\"\"` |\n| `.vue` SFC | Complete LiveView from a `.vue` file | `use PhoenixVapor.Reactive, file: \"Counter.vue\"` |\n| Vapor DOM | Bypass morphdom — direct DOM writes | `patchLiveSocket(liveSocket)` |\n\n## Installation\n\n```elixir\ndef deps do\n  [\n    {:phoenix_vapor, \"~\u003e 0.1.0\"},\n    {:quickbeam, \"~\u003e 0.3.0\", optional: true}  # for complex JS expressions\n  ]\nend\n```\n\n## Supported syntax\n\n`{{ expr }}` · `:attr=\"expr\"` · `@click=\"handler\"` · `v-if` / `v-else-if` / `v-else` · `v-for` · `v-show` · `v-model` · `v-html` · ternaries · arithmetic · `.length` · `.toUpperCase()` · dot access · components\n\nSimple expressions evaluate in pure Elixir via OXC AST. Complex expressions (arrow functions, `.filter()`, `.map()`) fall back to [QuickBEAM](https://hex.pm/packages/quickbeam).\n\n## `.vue` SFC mode\n\n```vue\n\u003cscript setup\u003e\nimport { ref, computed } from \"vue\"\nconst count = ref(0)\nconst doubled = computed(() =\u003e count * 2)\nfunction increment() { count++ }\n\u003c/script\u003e\n\n\u003ctemplate\u003e\n  \u003cp\u003e{{ count }} × 2 = {{ doubled }}\u003c/p\u003e\n  \u003cbutton @click=\"increment\"\u003e+\u003c/button\u003e\n\u003c/template\u003e\n```\n\n```elixir\ndefmodule MyAppWeb.CounterLive do\n  use MyAppWeb, :live_view\n  use PhoenixVapor.Reactive, file: \"Counter.vue\"\nend\n```\n\n`ref()` → assigns, `computed()` → derived state, functions → event handlers. Three lines of Elixir.\n\n## Vapor DOM\n\nOpt-in morphdom bypass. The client parses statics once, builds a registry mapping each dynamic slot to its DOM node, then applies diffs as direct property writes.\n\n```js\nimport { patchLiveSocket } from \"phoenix_vapor\"\npatchLiveSocket(liveSocket)\n```\n\nSee [ARCHITECTURE.md](ARCHITECTURE.md) for protocol-level details.\n\n## Docs\n\n- **[ARCHITECTURE.md](ARCHITECTURE.md)** — how it works at the protocol level, with wire format examples\n- **[examples/demo](https://github.com/elixir-volt/phoenix_vapor/tree/master/examples/demo)** — runnable Phoenix app with all features\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixir-volt%2Fphoenix_vapor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felixir-volt%2Fphoenix_vapor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixir-volt%2Fphoenix_vapor/lists"}