Skip to content

arizona-framework/arizona

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Arizona

arizona_256x256

Arizona is a modern web framework for Erlang, delivering real-time web applications with optimized performance and compile-time efficiency.

⚠️ Warning

Work in progress.

Use it at your own risk, as the API may change at any time.

Key Features

  • 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 {}

Quick Start

1. Add Dependency

In your rebar.config:

{deps, [
    {arizona, {git, "https://github.com/arizona-framework/arizona", {branch, "main"}}}
]}.

2. Start Server

{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"}}
    ]
}).

Live Demo

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:

Explore the Code

Each demo corresponds to complete source code in test/support/e2e/:

Template Syntax

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>
""")

Component Architecture

  • 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

Requirements

  • Erlang/OTP 27+

Sponsors

If you like this tool, please consider sponsoring me. I'm thankful for your never-ending support ❤️

I also accept coffees ☕

"Buy Me A Coffee"

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for development setup, testing guidelines, and contribution workflow.

License

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.

About

A web framework for Erlang/OTP

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

  •  

Contributors 3

  •  
  •  
  •