How phoenixframework/phoenix works
Phoenix is an Elixir web framework, with an accompanying installer that generates Phoenix applications. A typical application request enters through an endpoint and router, then reaches controller behavior; real-time clients use the channel and transport facilities. The repository also provides project scaffolding, code reloading, verified routes, and generators for common application features. The README documents the installer workflow, while several runtime connections are not visible in the sampled excerpts, so those relationships are omitted rather than inferred.
Main entry points: phx.new.ex Project Task · transport.ex Socket Transport · phoenix.js Browser Channels · endpoint.ex Endpoint
Components 22
HTTP Application Runtime
- Endpoint
lib/phoenix/endpoint.ex - Router
lib/phoenix/router.ex - Controller
lib/phoenix/controller.ex - Controller Pipeline
lib/phoenix/controller/pipeline.ex - Verified Routes
lib/phoenix/verified_routes.ex
Real-Time Communication
- Socket
lib/phoenix/socket.ex - Socket Transport
lib/phoenix/socket/transport.ex - Channel Server
lib/phoenix/channel/server.ex - Presence
lib/phoenix/presence.ex - Browser Channels
priv/static/phoenix.js
Project Scaffolding
- Project Task
installer/lib/mix/tasks/phx.new.ex - Project Generator
installer/lib/phx_new/generator.ex - Ecto Setup
installer/lib/mix/tasks/phx.new.ecto.ex - Web Setup
installer/lib/mix/tasks/phx.new.web.ex
Developer Features
- Auth Generator
lib/mix/tasks/phx.gen.auth.ex - Context Generator
lib/mix/tasks/phx.gen.context.ex - HTML Generator
lib/mix/tasks/phx.gen.html.ex - JSON Generator
lib/mix/tasks/phx.gen.json.ex - Live Generator
lib/mix/tasks/phx.gen.live.ex - Code Reloader
lib/phoenix/code_reloader/server.ex - Asset Digest
lib/phoenix/digester.ex
Other components
- Application User
Connections 7
- Application User → Endpoint: sends requests
- Application User → Browser Channels: uses channels
- Browser Channels → Socket Transport: opens transport
- Socket Transport → Channel Server: dispatches messages
- Project Task → Project Generator: generates project
- Project Task → Ecto Setup: configures Ecto
- Project Task → Web Setup: configures web