Installs PhoenixFilament admin panel in your Phoenix app.
Usage
mix phx_filament.installWhat it does
- Creates an admin Panel module at
lib/{app_web}/admin.ex - Copies Chart.js vendor asset to
assets/vendor/chart.min.js - Creates
assets/js/phx_filament_hooks.jswith Chart.js LiveView hook - Patches
router.exto importPhoenixFilament.Panel.Routerand mount the panel - Patches
assets/js/app.jsto importphx_filament_hooks.js
Running this task multiple times is safe — it is idempotent.
Router patching
The installer attempts to automatically patch router.ex. If it cannot find
the router or the browser scope, it will print clear instructions for manual steps.
JS patching
The installer attempts to automatically patch assets/js/app.js. If it cannot
find the file, it will print clear instructions for manual steps.