// the find
edelvalle/reactor
Phoenix LiveView but for Django
A Django library that replicates Phoenix LiveView: components are server-side Pydantic models rendered to HTML templates, kept in sync over Django Channels websockets, with DOM patches applied via morphdom. Aimed at Django developers who want server-driven interactivity without writing a separate JS frontend or API layer.
Reconnection is handled properly — the frontend keeps the last serialized component state in the DOM so a dropped websocket doesn't lose state, it just rebuilds and resyncs on reconnect, which is a detail a lot of clones of this pattern skip. Auto-broadcast hooks directly into Django's ORM signals, so model mutations push UI updates to subscribed components without you wiring up a pub/sub layer by hand. Bandwidth is handled sensibly: optional `difflib`-based HTML diffing instead of shipping full markup on every update, with HTML minification as an opt-in extra via django-hmin.
Last push was Feb 2025, and at 638 stars/25 forks with a single primary maintainer (edelvalle), this is a one-person project — fine for a side app, risky to build production infrastructure on. The default channel layer is in-memory and explicitly can't do real broadcasting across processes, so any real deployment needs Redis wired in separately; that's an operational dependency the README mentions but doesn't walk through configuring. Documentation is a single long README plus a one-page docs/index.md — there's no API reference, and non-trivial behavior (event argument scoping by `<form>`, the `.json` param serialization convention) is explained through prose examples rather than a spec. The library's own README admits that on connection loss, components go fully inert until the socket reconnects — there's no offline/optimistic-update story at all, so anything requiring resilience on flaky connections needs to be built on top.