A modern Phoenix 1.8 application with:
To start your Phoenix server:
mix setup to install and setup dependenciesmix phx.server or inside IEx with iex -S mix phx.serverNow you can visit:
localhost:4000 - Home pagelocalhost:4000/demo - LiveView demolocalhost:4000/inertia/counter - Inertia + Svelte demoWhen you run mix phx.server, Vite automatically starts on port 5173 and provides:
mix assets.deploy builds optimized bundlesassets/
├── css/
│ └── app.css # Tailwind CSS v4 with DaisyUI
├── js/
│ └── app.js # Main entry point (Phoenix + Inertia)
├── svelte/
│ └── Counter.svelte # Svelte 5 components
├── vite.config.mjs # Vite configuration
└── package.json # Frontend dependencies
This project uses phoenix_vite for seamless Vite integration:
Components use modern Svelte 5 syntax:
<script>
let { counter = 0 } = $props()
let currentCounter = $state(counter)
</script>
Mix and match LiveView and Inertia:
Ready to run in production? Please check our deployment guides.
Follow these steps to run the application in a production-like environment:
MIX_ENV=prod mix assets.deploy
export DATABASE_URL="ecto://127.0.0.1/phx_prod.db"
export SECRET_KEY_BASE="$(MIX_ENV=prod mix phx.gen.secret)"
export PHX_URL_SCHEME="http"
export PHX_HOST="localhost"
export PHX_URL_PORT=4000
export PORT=4000
PHX_SERVER=true MIX_ENV=prod mix phx.server