I’m excited to announce ExInertia, a toolkit built on top of Igniter that provides a robust integration between Phoenix and Inertia.js, with first-class support for Routes library and Bun.
Technical Stack:
- Built on Igniter for powerful, composable installer generators
- Full Inertia.js integration with Phoenix using Inertiajs/inertia-phoenix
- Modern asset pipeline using Bun + Vite (replacing esbuild/tailwind)
- Built-in Routes integration for type-safe routing between Phoenix and TypeScript
- Automated manifest handling for Vite assets
Installation:
def deps do
[
{:exinertia, "~> 0.5.0"},
]
end
The installer, powered by Igniter (thanks @zachdaniel ), handles the complete setup:
mix exinertia.install
What gets installed:
- Vite manifest reader in your Web namespace
- Inertia pipeline + configuration in your Router
- Routes integration for type-safe routing
- Modified root layout with Vite asset handling
- Complete Bun + Vite setup replacing esbuild/tailwind
- TypeScript-ready frontend structure with Routes type definitions
- Automated mix aliases for asset building
Development Experience:
- Hot Module Replacement (HMR) with Vite
- TypeScript compilation with Bun
- Type-safe routing between Phoenix and TypeScript using Routes
- Seamless server-side rendering support
- Zero-configuration Tailwind integration
Type-safe routing example with Routes:
// Your routes are automatically typed!
const url = Routes.path('user.show', { id: 123 });
// => "/users/123"
// TypeScript error if you miss required params
const url = Routes.path('user.show'); // Error: missing id parameter
The project is built to be modular - you can use the installers independently or compose them with your own Igniter-based installers.
Resources:
- Documentation: HexDocs
- GitHub:
Contributions and feedback are welcome! We’re particularly interested in hearing about different use cases and integration patterns.