
Why?
Every time I start a new Phoenix project, I find myself doing the same repetitive stuff: swapping esbuild for Bun, adding Oban, configuring Credo, removing DaisyUI components I don’t need, setting up pgvector, etc.
I also have very specific preferences that take forever to do manually on every project, like sorting mix.exs dependencies by name, implementing @PJUllrich’s Unaccented Name Search With Postres, and all the things in @JohnnyCurran’s The Modifications I Make to Every New Phoenix Project.
Igniter.install is great for getting started but isn’t available in many older projects, often has optional steps left out (adding Oban.Telemetry.attach_default_logger() in application.ex when installing Oban), and afaik hasn’t been used yet for removing code from Phoenix (like getting rid of all Topbar.js or DaisyUI code, not just the dependencies).
Project
Project saves you time by skipping the repetitive boilerplate setup and removal code at the start (or middle!) of every Phoenix project. Run custom, composed Igniter tasks at one time, with a single command.
Features
- Add tasks - Install and configure packages like Bun, Oban, Credo, Pgvector, and more
- Remove tasks - Clean up unwanted code like DaisyUI, Topbar, theme toggle
- Gen tasks - Generate boilerplate code and run convenience tasks
Installation
Add project to your list of dependencies in mix.exs:
def deps do
[
{:project, "~> 1.0"}
]
end
Generate a custom setup task for your project:
mix project.gen.setup
This creates lib/mix/tasks/<your_app_name>.setup.ex which you can edit to control which tasks run and in what order.
Or run the default setup task directly
mix project.setup
Usage
Optional tasks can be added via flags:
mix project.setup --oban-pro --gigalixir --mix-test-watch
mix your_app_name.setup --oban-pro
Any task can be run individually
Add a package:
mix project.add bun
mix project.add oban,credo,pgvector
Remove code:
mix project.remove daisy_ui
mix project.remove theme_toggle
Generate code:
mix project.gen home_page
mix project.gen app_layout
Available Tasks
Add Tasks
bun- Replace esbuild with Buncredo- Add Credo for static analysisdotenv_parser- Add DotenvParser for .env filesex_sync- Add ExSync for auto-recompilationlibcluster- Add libcluster for node clusteringmix_test_watch- Add mix_test_watch for running tests on file changes (optional)oban- Add Oban for background jobsoban_pro- Add Oban Pro extensions (optional)oban_web- Add Oban Web UIpgvector- Add pgvector for vector similarity searchquokka- Add Quokka for code formattingremix_icons- Add Remix Iconstidewave- Add Tidewave MCOuuidv7- Add UUIDv7 support
Remove Tasks
daisy_ui- Remove DaisyUI componentslive_title_suffix- Remove live title suffixrepo_credentials- Remove repo credentials from configtheme_toggle- Remove theme toggle functionalitytopbar- Remove Topbar.js
Gen Tasks
app_layout- Generate a clean app layoutclass_formatter- Generate TailwindCSS class formattergigalixir- Generate Gigalixir deployment config (optional)gitignore- Generate .gitignore additionsgraph_db- Generate graph database tables for nodes and edges (optional)home_page- Generate a minimal home pagepg_extensions- Generate PostgreSQL extensions migrationrepo_config- Generate repo configurationschema- Generate schema helperssort_deps- Sort mix.exs dependencies alphabetically
Customization
After running mix project.gen.setup, edit the tasks/0 function in lib/mix/tasks/<your_app_name>.setup.ex.
- Reorder tasks
- Remove tasks you don’t need
- Add your own custom tasks
- Use
{:optional, :flag_name}placeholders for custom flags
What’s next?
I’m be adding more tasks based on what I find myself needing and which tasks are contributed. Ideally, this becomes a community-led compendium of custom tasks! ![]()
![]()
![]()
![]()
![]()
Hex: project | Hex
Twitter: https://x.com/random
GitHub:






















