SelectoMix
Alpha software. Generation flows are usable but still evolving.
selecto_mix is the tooling package for setting up Selecto in an Elixir project.
Use it when you want to:
- generate domains from Ecto schemas
- generate overlays and preserve customizations across refreshes
- scaffold saved views, exported views, and filter sets
- install Selecto-related dependencies and front-end integration
- validate parameterized joins
Installation
def deps do
[
{:selecto_mix, ">= 0.4.2 and < 0.5.0"},
{:selecto, ">= 0.4.3 and < 0.5.0"},
{:selecto_db_postgresql, ">= 0.4.2 and < 0.5.0"},
{:postgrex, ">= 0.0.0"},
{:ecto, "~> 3.10"}
]
endThen run:
mix igniter.install selecto_mix
mix assets.buildFor local multi-repo workspace development:
mix selecto.install --development-mode --source your-github-userQuick Start
Generate a domain from one schema:
mix selecto.gen.domain MyApp.Catalog.ProductGenerate domains for all schemas:
mix selecto.gen.domain --allGenerate a domain plus LiveView wiring:
mix selecto.gen.domain MyApp.Catalog.Product --liveCore Workflow
Recommended workflow:
- Generate the base domain from your Ecto schema.
- Keep schema-derived structure in the generated file.
- Put custom filters, columns, and named functions in overlays when possible.
- Re-run generation when schemas change.
That keeps generated structure and user-authored behavior separate.
Common Tasks
mix selecto.gen.domainmix selecto.installmix selecto.gen.saved_viewsmix selecto.gen.saved_view_configsmix selecto.gen.exported_viewsmix selecto.gen.filter_setsmix selecto.gen.live_dashboardmix selecto.add_timeoutsmix selecto.validate.parameterized_joins
UDF Workflow
Generated domains now include a stable functions: %{} section.
Generated overlays include deffunction examples so named function registrations can live outside regenerated files.
Recommended UDF pattern:
- generate the domain
- keep structural metadata in the generated domain file
-
add custom
deffunctiondefinitions in the overlay - regenerate safely as schemas evolve
Status
Current 0.4.x scope:
- domain generation is usable but not stable
- customization preservation is a core goal and supported path
- parameterized join validation exists and is still expanding
- runtime query helper generation is intentionally not part of the current scope
Demos And Tutorials
selecto_livebooksselecto_northwind-
hosted demo:
testselecto.fly.dev