Code Monkey home page Code Monkey logo

next-todos's Introduction

next-todos

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

The todos are synced between browsers.

Live

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.

Server

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

Developing

npm run dev

Production

npm run build
npm start

Not covered

  • Authentication / session
  • Scaling

Related

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

next-todos's People

Contributors

lipp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

next-todos's Issues

Example isn't working

Example isn't working and gives following error:

VM50:37 WebSocket connection to 'wss://todos-demo.now.sh/' failed: Error during WebSocket handshake: Unexpected response code: 200

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.