200 lines realtime todos app powered by next.js, preact, jet, redux and now
Branch: master
Clone or download
lipp Preact (#7)
* use preact

* use preact
Latest commit 23a6345 Jun 21, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
components Preact (#7) Jun 21, 2017
containers clean store and use selectors Dec 21, 2016
pages move all jet logic to store.js Dec 21, 2016
static add missing vendor prefixes Dec 22, 2016
LICENSE Initial commit Dec 1, 2016
README.md Update README.md Dec 21, 2016
connection.js refactor store Dec 21, 2016
next.config.js Preact (#7) Jun 21, 2017
package.json Preact (#7) Jun 21, 2017
store.js refactor store Dec 21, 2016
todos.gif add screenshot Dec 5, 2016



About 200 lines isomorphic todos app powered by next.js, redux and Jet realtime.

The todos are synced between browsers.


The canonical TodoApp using node-jet as realtime data backend mechanism. Jet uses websockets for fetching/streaming the data and to make changes to the data. Redux and redux-jet are used for a clear and simple unidirectional data flow.

next.js allows to easily make the server -> client render transition (awesome!!!).

redux-jet hides the stateful nature of the realtime streaming (where differences are pushed over the wire) and helps doing the isomorphic transition with get and fetch seamlessly.

It's note worthy, that the redux store is identical for server and client js code! The only difference is that the store population on the server is triggered by the "finite" redux-jet get whereas the client issues an "infinite / streaming" redux-jet fetch

The components are jet-agnostic. All the jet related stuff is located in containers dir and store.js.


The server source can be found here (90 Lines extra).

Inspect with Radar

Radar provides another view on the realtime data which is provided by a Jet Daemon running on todos-demo.now.sh.

Enter this daemon url: wss://todos-demo.now.sh


npm run dev


npm run build
npm start

Not covered

  • Authentication / session
  • Scaling


100 lines of code Hackernews reader using next.js and graphql.