Arizona is a modern web framework for Erlang, delivering real-time web applications with optimized performance and compile-time efficiency.
Work in progress.
Use it at your own risk, as the API may change at any time.
- Real-time WebSocket updates
- Hierarchical component rendering
- Compile-time template optimization
- Type-safe stateful and stateless components
- Efficient differential DOM updates
- Simple template syntax: plain HTML with Erlang expressions in
{}
In your rebar.config
:
{deps, [
{arizona, {git, "https://github.com/arizona-framework/arizona", {branch, "main"}}}
]}.
{ok, _Pid} = arizona_server:start(#{
port => 8080,
routes => [
{live, ~"/my-view", my_view_module},
{live_websocket, ~"/live/websocket"},
{static, ~"/assets", {priv_dir, arizona, ~"static/assets"}}
]
}).
Try the complete working examples:
# Clone and run the test server
$ git clone https://github.com/arizona-framework/arizona
$ cd arizona
$ ./scripts/start_test_server.sh
Then visit:
- http://localhost:8080/counter - Simple stateful interactions
- http://localhost:8080/todo - CRUD operations and list management
- http://localhost:8080/modal - Dynamic overlays and slot composition
- http://localhost:8080/datagrid - Sortable tables with complex data
Each demo corresponds to complete source code in test/support/e2e/
:
- Counter App
- Layout + View with event handling
- Todo App
- Complex state management patterns
- Modal System
- Component composition and slots
- Data Grid
- Advanced data presentation
Arizona templates use plain HTML with Erlang expressions in {}
:
arizona_template:from_string(~"""
<div class="counter">
<h1>Count: {arizona_template:get_binding(count, Bindings)}</h1>
<button onclick="arizona.sendEvent('increment')">+</button>
</div>
""")
- Layouts: HTML document wrappers with slots for dynamic content insertion
- Views: Top-level components managing application state
- Stateful Components: Components with lifecycle and persistent state
- Stateless Components: Pure rendering functions
- List Components: Optimized rendering for collections
- Erlang/OTP 27+
If you like this tool, please consider sponsoring me. I'm thankful for your never-ending support ❤️
I also accept coffees ☕
Contributions are welcome! Please see CONTRIBUTING.md for development setup, testing guidelines, and contribution workflow.
Copyright (c) 2023-2025 William Fank Thomé
Arizona is 100% open-source and community-driven. All components are available under the Apache 2 License on GitHub.
See LICENSE.md for more information.