No description
  • Scala 97.7%
  • JavaScript 1.9%
  • Shell 0.2%
  • Nix 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Paul-Henri Froidmont fd617752c2
Some checks failed
Publish snapshot / deploy-documentation (push) Has been cancelled
Publish snapshot / publish (push) Has been cancelled
feat(forms): add repeated-choice checkbox bindings
2026-09-19 17:37:29 +02:00
.github/workflows feat(assets): package Phoenix LiveView clients 2026-08-31 05:52:37 +02:00
benchmarks chore: finalize runtime cleanup 2026-08-24 15:19:58 +02:00
docs feat(forms): add repeated-choice checkbox bindings 2026-09-19 17:37:29 +02:00
documentation feat(forms): add repeated-choice checkbox bindings 2026-09-19 17:37:29 +02:00
e2eApp feat(forms): add repeated-choice checkbox bindings 2026-09-19 17:37:29 +02:00
rootSliceApp feat(routing): separate session and route mount aspects 2026-09-01 12:45:37 +02:00
scalive feat(forms): add repeated-choice checkbox bindings 2026-09-19 17:37:29 +02:00
scripts feat(forms): add blur-aware feedback bindings 2026-09-10 11:29:35 +02:00
test fix(render): preserve form recovery bindings 2026-09-01 15:57:20 +02:00
.envrc feat!: align with Phoenix LiveView 1.2.10 2026-08-26 19:31:15 +02:00
.gitignore fix(runtime): stabilize browser crash recovery 2026-08-21 17:35:41 +02:00
.scalafix.conf Configure scalafix 2025-11-07 05:10:10 +01:00
.scalafmt.conf build(deps): update Mill dependencies 2026-08-22 02:31:33 +02:00
AGENTS.md docs: update agent instructions 2026-05-04 05:10:40 +02:00
build.mill fix(build): stage Nix resources for BSP 2026-08-31 13:06:34 +02:00
DomDefsGenerator.mill build(deps): update Mill dependencies 2026-08-22 02:31:33 +02:00
flake.lock feat!: align with Phoenix LiveView 1.2.10 2026-08-26 19:31:15 +02:00
flake.nix feat(assets): package Phoenix LiveView clients 2026-08-31 05:52:37 +02:00
LICENSE docs: add MIT license 2026-08-15 00:20:01 +02:00
NpmAssets.mill feat(assets)!: support complete asset graphs 2026-08-31 00:54:01 +02:00
README.md feat(assets): package Phoenix LiveView clients 2026-08-31 05:52:37 +02:00

Scalive

Publish snapshot Documentation License

Live interfaces. Typed end to end.

Scalive is a Scala 3 reimplementation of the Phoenix LiveView programming model. It keeps application state, rendering, and effects on the server, handles browser interactions as typed messages, and sends efficient HTML updates through the Phoenix LiveView client.

Scalive provides Scala-first APIs for typed models, messages, routes, forms, components, and HTML, with ZIO for effects. It targets observable LiveView behavior and feature coverage rather than Phoenix source or API compatibility.

Warning

Scalive is alpha software. APIs may change without compatibility shims, and feature coverage and production maturity are still evolving. Review the project status and compatibility matrix before use.

A LiveView In Scala

import scalive.*
import zio.{Task, ZIO}

final class CounterLiveView extends LiveView[CounterLiveView.Msg, Int]:
  import CounterLiveView.Msg

  def mount(ctx: MountContext): Task[Int] =
    ZIO.succeed(0)

  def handleMessage(model: Int, ctx: MessageContext) =
    case Msg.Decrement => ZIO.succeed(model - 1)
    case Msg.Increment => ZIO.succeed(model + 1)

  def view(model: Signal[Int]): HtmlElement[Msg] =
    mainTag(
      h1("Scalive counter"),
      button(typ := "button", on.click(Msg.Decrement), "Decrease"),
      outputTag(aria.live := "polite", model.map(_.toString)),
      button(typ := "button", on.click(Msg.Increment), "Increase")
    )

object CounterLiveView:
  enum Msg:
    case Decrement, Increment

Run the counter or build it from scratch.

Start Here

Development

Enter the repository development environment and run the common checks:

nix develop
mill __.reformat + __.fix
mill __.test
mill documentation.check

The Nix shell also provides the hash-pinned Phoenix client resources required by the Mill build. Run maintainer builds inside nix develop; published artifacts remain self-contained and impose no Nix requirement on application consumers.

The snapshot workflow also runs the root-slice and upstream Phoenix LiveView browser suites.

Report bugs, missing behavior, and focused feature requests through GitHub issues.

License

Scalive is available under the MIT License.