Peace of mind from prototype to production
Build rich, interactive web applications quickly, with less code and fewer moving parts. Join our growing community of developers using Phoenix to craft APIs, HTML5 apps and more, for fun or at scale.
defmodule TimelineLive do
use Phoenix.LiveView
def render(assigns) do
render("timeline.html", assigns)
end
def mount(_, _, socket) do
Twitter.subscribe("elixirphoenix")
{:ok, assign(socket, :tweets, [])}
end
def handle_info({:new, tweet}, socket) do
{:noreply,
update(socket, :tweets, fn tweets ->
Enum.take([tweet | tweets], 10)
end)}
end
end
@nathanwillson
Using @elixirphoenix's LiveView to filter over 800 tree species (https://treelib.ca/species). I'm so impressed with how fast it is and how easy it was to write. #myelixirstatus #phoenixframework 🌲🌳🌲
Phoenix LiveView
The most fun you'll ever have building interactive web applications – without the complexity.
Try it now:
- Install the Elixir programming language
-
Install the Phoenix project generator and create your project
mix archive.install hex phx_new
mix phx.new demo
- See complete installation instructions
Everything you need to ship it
Real-time
Interact with users and push events, across one or dozens of nodes, by using our built-in PubSub, and Channels.
Authentication
Run mix phx.gen.auth
for full-featured authentication that grows with your application.
GraphQL & JSON APIs
Build scalable GraphQL apps with Absinthe , or use our built-in JSON support for world class APIs.
Docker Ready
Package your app and (optionally) generate a Dockerfile for hassle-free deployment, wherever you choose to run your apps.
Metrics
Built-in instrumentation and a live dashboard gives you insight into your applications. Monitor performance and diagnose issues right within your app.
Scalable
Phoenix runs on the Erlang VM with the ability to handle millions of WebSocket connections alongside Elixir's tooling for building robust systems.
Presence
Know who is connected right now, across one or dozens of nodes, by using our built-in Presence. No dependency required.
Database
Ecto is a lean interface around your database, focused on productivity and long-term maintainability. Postgres, MySQL, SQLite, and SQL Server built-in.
The best of front-end and backend in your HTML
HEEx (HTML + Embedded Elixir) is a performant templating language with support for reusable components.
Reusable Components
A natural syntax for encapsulating your HTML into functional and reusable building blocks
Compiler Checks
Declare attributes and slots for your components and get immediate feedback right in your editor – say goodbye to typos and guesswork
Built-in Formatting
Format your whole codebase with a single command – whether writing Elixir or HTML. Forget tedious fiddling with copy/pasted blocks of code.