Build real-time apps with the language that powers Discord and WhatsApp.
I created this tutorial because I wanted to learn Elixir and build real apps with it. Rather than keep my notes private, I decided to turn them into something that might help others too. This is my learning journey, documented as I go.
Browse the docs on GitHub or clone the repo for an AI-guided walkthrough if you are lazy and want to see how cool this is.
Read the documentation directly on GitHub:
Get an interactive, personalized walkthrough with Claude Code:
# 1. Clone the repo
git clone https://github.com/spaceCabbage/elixir-phoenix-tutorial.git
cd elixir-phoenix-tutorial
# 2. Install Claude Code (if you haven't)
# See: https://docs.anthropic.com/claude-code
# 3. Start the guided tutorial
claude
# Then type: beginThe AI will guide you through the curriculum, pause to check understanding, and let you explore the codebase at your own pace.
If you're using VSCode with the Claude Code extension:
- Open this repo in VSCode
- Run the task:
Ctrl+Shift+P→ "Run Task" → "Start Elixir Tutorial" - Type
beginin the Claude panel
Optional keybinding: Add this to your keybindings.json (Ctrl+Shift+P → "Open Keyboard Shortcuts (JSON)"):
{
"key": "ctrl+alt+t",
"command": "workbench.action.tasks.runTask",
"args": "Start Elixir Tutorial"
}Then press Ctrl+Alt+T to open Claude instantly.
mix deps.get # Install dependencies
mix ecto.create # Create database
mix ecto.migrate # Run migrations
iex -S mix phx.server # Start with interactive shellVisit http://localhost:4000
| Section | Topics | Time |
|---|---|---|
| Getting Started | Installation, editor setup, IEx | 30 min |
| Erlang Primer | BEAM VM, OTP, why Elixir exists | 30 min |
| Elixir Fundamentals | Pattern matching, pipes, functions, processes | 2-3 hrs |
| OTP Fundamentals | GenServer, Supervisors, fault tolerance | 1-2 hrs |
| Phoenix Framework | Request lifecycle, routing, contexts | 1-2 hrs |
| Ecto Database | Schemas, changesets, queries | 1-2 hrs |
| LiveView | Real-time UI, events, PubSub | 1-2 hrs |
| This Codebase | Guided tour, exercises | 2-3 hrs |
| Testing | ExUnit, testing patterns | 1 hr |
Total: 10-15 hours
For a condensed overview, see the Crash Course.
Phoenix excels at real-time, high-concurrency applications:
- Chat & messaging - WhatsApp-scale connections
- Live dashboards - Stock tickers, analytics, monitoring
- Collaborative tools - Google Docs-style real-time editing
- IoT backends - Millions of connected devices
- APIs - High-throughput, low-latency services
Notable users: Discord (150M+ users), Bleacher Report (reduced 150 servers to 5), Toyota Connected, Pinterest.
Phoenix apps typically deploy to:
- Fly.io - Official recommendation, run
fly launch - Gigalixir - Elixir-specific PaaS
- Docker - Standard containerization
- Bare metal - Elixir releases with
mix release
You can use this for learning and personal projects. For commercial use, reach out.