Hey everyone!
I wanted to share Nova, a web framework built on Erlang/OTP that works natively with Erlang, Elixir, and LFE. If you’ve ever wanted a web framework that leans into OTP rather than
abstracting over it, Nova might be worth a look.
Why Nova?
Nova is an OTP-native web framework. Your application is a proper OTP app with supervision trees and releases from the start. It uses Cowboy under the hood and provides a familiar
MVC-style controller pattern – controllers are just functions that take a request map and return tuples:
%% Erlang
index(_Req) →
Q = kura_query:from(pet),
{ok, Pets} = my_repo:all(Q),
{json, #{data => Pets}}.
Elixir – same pattern, same framework
def index(_req) do
q = :kura_query.from(:pet)
{:ok, pets} = MyRepo.all(q)
{:json, %{data: pets}}
end
Since everything on the BEAM compiles to the same bytecode, you can mix and match languages freely. Write your router in Erlang, your controllers in Elixir, your templates in LFE –
Nova doesn’t care.
Getting started with Elixir (Mix)
Install the generator
mix archive.install hex nova_new
Scaffold a new project
mix nova.new my_app
cd my_app
mix deps.get
iex -S mix
Your app is running at http://localhost:8080. That’s it.
For Erlang users, there’s an equivalent rebar3 workflow:
rebar3 new nova my_app
cd my_app
rebar3 nova serve
What’s in the ecosystem?
Nova isn’t just a web layer. There’s a growing set of tools around it:
- Kura – an Ecto-inspired database layer for Erlang/OTP. Schemas, changesets, migrations, queries, associations. Works with PostgreSQL via pgo. If you know Ecto, Kura will feel
familiar. - nova_test – testing utilities and request builders
- opentelemetry_nova – automatic OpenTelemetry instrumentation
- Code generators – rebar3 nova gen_resource pets scaffolds a full CRUD controller, schema, migration, and routes
- OpenAPI – auto-generate OpenAPI specs from your routes with built-in Swagger UI
A real example: pet_store
Here’s what a full CRUD controller looks like using Nova + Kura. This is from the pet_store example app:
Schema:
-module(pet).
-behaviour(kura_schema).
-include_lib(“kura/include/kura.hrl”).
-export([table/0, fields/0, primary_key/0]).
table() → <<“pets”>>.
primary_key() → id.
fields() →
[
#kura_field{name = id, type = id, primary_key = true, nullable = false},
#kura_field{name = name, type = string, nullable = false},
#kura_field{name = species, type = string, nullable = false},
#kura_field{name = breed, type = string},
#kura_field{name = age, type = integer}
].
Controller:
create(#{json := Params} = _Req) →
CS = kura_changeset:cast(pet, #{}, Params, [name, species, breed, age]),
CS1 = kura_changeset:validate_required(CS, [name, species]),
case pet_store_repo:insert(CS1) of
{ok, Pet} →
{status, 201, #{}, #{data => Pet}};
{error, #kura_changeset{errors = Errors}} →
{status, 422, #{}, #{errors => Errors}}
end.
Router:
routes(_Environment) →
[#{prefix => “/api”,
security => false,
plugins => [{pre_request, nova_request_plugin, #{decode_json_body => true}}],
routes => [
{“/pets”, fun pets_controller:index/1, #{methods => [get]}},
{“/pets”, fun pets_controller:create/1, #{methods => [post]}},
{“/pets/:id”, fun pets_controller:show/1, #{methods => [get]}},
{“/pets/:id”, fun pets_controller:update/1, #{methods => [put]}},
{“/pets/:id”, fun pets_controller:delete/1, #{methods => [delete]}}
]}].
The changeset pattern (cast → validate → insert) will be very familiar to anyone coming from Ecto/Phoenix.
Features at a glance
- Plugin pipeline – composable middleware with pre_request / post_request hooks, configurable per route group
- WebSockets – first-class support via nova_websocket behaviour
- PubSub – distributed pub/sub via OTP’s pg module, works across clustered nodes
- Sessions – built-in session management (ETS-backed by default)
- Security middleware – per-route authentication/authorization callbacks
- Hot reload – rebar3 nova serve watches files and recompiles on change
- Sub-applications – mount Nova apps under path prefixes, like Rails engines
Learn more
- The Nova Book – a full walkthrough building a blog platform from scratch, covering routing, plugins, Kura (schemas, migrations, CRUD), WebSockets, pub/sub, testing, OpenAPI, and
deployment - pet_store example – a complete Nova + Kura REST API demo
- Hex package (v0.13.7)
- HexDocs
- GitHub






















