๐Ÿ”ฅ

Phoenix

Phoenix is a web framework for Elixir built on top of the Erlang VM (BEAM), created by Chris McCord and developed with the wider Elixir community. It ranks around #27 among web frameworks at roughly 2.4% usage share. It's famous for handling enormous numbers of concurrent real-time connections โ€” chat, live dashboards, multiplayer features โ€” with very low resource use, thanks largely to LiveView, which lets developers build real-time interactive UI without writing JavaScript.

Quick facts
Type: Web framework (built on the Erlang VM / BEAM)
Made by: Chris McCord / Elixir community
License: Free / open-source (MIT)
Language: Elixir
Primary use case: Real-time, highly concurrent apps โ€” chat, live dashboards, multiplayer features โ€” via LiveView
Jump to: ExampleGetting startedBest for

Example

A Phoenix controller module maps actions to functions that render a response, following a familiar MVC-style structure.

defmodule MyAppWeb.PageController do
  use MyAppWeb, :controller

  def index(conn, _params) do
    render(conn, :index, page_title: "Home")
  end

  def show(conn, %{"id" => id}) do
    post = Blog.get_post!(id)
    render(conn, :show, post: post)
  end
end

Getting started

Install the Phoenix project generator via Mix (Elixir's build tool), then generate and run a new app.

# install the Phoenix app generator
mix archive.install hex phx_new

# create a new Phoenix project
mix phx.new my_app
cd my_app
mix phx.server
Best for: Applications needing many simultaneous real-time connections โ€” live chat, dashboards, collaborative or multiplayer features โ€” where Elixir's concurrency model and LiveView save you from hand-building a separate JavaScript real-time layer.