### Phoenix Project Structure Example (Umbrella) Source: https://hexdocs.pm/phx_new/Mix.Tasks.Phx Illustrates the directory structure and module organization created by `mix phx.new` when using the `--umbrella` flag. This structure separates core applications and the web interface into distinct sub-applications within an umbrella project. ```bash hello_umbrella/ Hello.Umbrella apps/ hello/ Hello hello_web/ HelloWeb ``` -------------------------------- ### Create New Phoenix Project Source: https://hexdocs.pm/phx_new/Mix.Tasks.Phx Generates a new Phoenix project at the specified path. Options allow customization of module names, application names, database adapters, HTTP adapters, and the inclusion of various project components like Ecto, LiveView, and Tailwind CSS. The `--umbrella` flag creates an umbrella project structure. ```bash $ mix phx.new PATH [--module MODULE] [--app APP] [--umbrella] [--database ADAPTER] [--adapter ADAPTER] [--no-assets] [--no-dashboard] [--no-ecto] [--no-esbuild] [--no-gettext] [--no-html] [--no-live] [--no-mailer] [--no-tailwind] [--binary-id] [--verbose] [-v --version] [--no-version-check] [--no-agents-md] ``` ```bash $ mix phx.new hello_world ``` ```bash $ mix phx.new hello_world --module HelloWorld ``` ```bash $ mix phx.new ~/Workspace/hello_world --no-html --no-assets ``` ```bash $ mix phx.new hello --umbrella ``` -------------------------------- ### Create Phoenix Web Project with Mix Phx.New.Web Source: https://hexdocs.pm/phx_new/Mix.Tasks.Phx.New Generates a new Phoenix web project within an umbrella project. This task creates a bare project without database integration. It requires the OTP app name as an argument and should be run from the umbrella application's apps directory. ```bash cd my_umbrella/apps mix phx.new.web APP [--module MODULE] [--app APP] ``` ```bash mix phx.new.web hello_web ``` ```bash mix phx.new.web hello_web --module HelloWeb ``` -------------------------------- ### Caching Phoenix Project Builds Source: https://hexdocs.pm/phx_new/Mix.Tasks.Phx Demonstrates how to create and use a cached build directory for `mix phx.new`. This involves generating a project, compiling dependencies, and then setting the `PHX_NEW_CACHE_DIR` environment variable when generating a new project to copy the cached build contents. ```bash mix phx.new mycache --no-install && cd mycache && mix deps.get && mix deps.compile && mix assets.setup && rm -rf assets config lib priv test mix.exs README.md ``` ```bash PHX_NEW_CACHE_DIR=/path/to/mycache mix phx.new myapp ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.