Official Elixir/Phoenix adapter for Inertia.js, enabling server-driven single-page applications with modern JavaScript frameworks.
Inertia.js Phoenix Adapter is the official server-side integration for building single-page applications (SPAs) using Phoenix and Elixir with Inertia.js. It allows developers to render full pages from Phoenix controllers that feel like client-side SPAs, eliminating the need to build a separate API layer. Developers can use frontend frameworks like React, Vue, or Svelte while leveraging Phoenix's backend capabilities.
Elixir/Phoenix developers building modern, reactive web applications who want to avoid the complexity of maintaining a separate API and frontend codebase. It's ideal for teams familiar with Phoenix who want to integrate Inertia.js for a seamless full-stack experience.
Developers choose this adapter because it provides a cohesive integration between Phoenix and Inertia.js, reducing duplication and complexity by allowing server-driven SPAs without a separate API. It offers unique server-side features like prop management utilities (lazy, deferred, merge, once, scroll props), built-in validation integration with Ecto changesets, and server-side rendering support via a Node.js worker pool.
The Phoenix adapter for Inertia.js.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Directly renders full pages from Phoenix controllers without a separate API layer, using plugs and controller helpers like `render_inertia` for server-driven SPAs.
Offers lazy evaluation, deferred props for async data, merge props for pagination, and once props for caching, as detailed in the README's prop management sections.
Integrates seamlessly with Ecto changesets via `assign_errors`, automatically flattening errors for Inertia's client-side form helpers.
Supports SSR via a Node.js worker pool for improved SEO and performance, with configurable fallbacks to client-side rendering on failure.
Enabling SSR requires additional esbuild configuration, Node.js installation in production, and managing a worker pool, adding deployment overhead.
SSR relies on Node.js, introducing an external runtime dependency that might conflict with pure Elixir deployment preferences.
Limited to Inertia.js-compatible frontends (React, Vue, Svelte), restricting choice if teams prefer other frameworks like Angular or plain JavaScript.