sc-sample-inventory

Scroll to the bottom for installation instructions.

A sample inventory tracking realtime single page app built with SocketCluster (http://socketcluster.io/), Google's Polymer (v1.0) Framework and RethinkDB. It demonstrates a way of building realtime apps.

All code for the server-side worker logic is linked from worker.js - It's mostly generic so feel free to reuse/modify for your own app or you can use this app as a base to build yours if starting from scratch.

Aside from SocketCluster, Polymer and RethinkDB, this sample app uses the following modules:

This sample app aims to demonstrate all the cutting edge features that one might want when building a realtime single page app including:

  • Authentication (via JWT tokens)
  • Access control using backend middleware
  • Reactive data binding
  • Realtime REST-like interface
  • Pagination with realtime updates

This is still work in progress. Keep in mind that this app is optimized for cutting-edgeness, not for backwards compatibility with older browsers :p

To make the most of this demo, you should open the web app in two different tabs/windows/browsers and make updates to the data in realtime.

Installation

To run this sample:

  • Make sure you have Git installed (https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
  • Make sure you have Node.js installed (http://nodejs.org/)
  • Make sure you have RethinkDB installed (https://www.rethinkdb.com/)
  • git clone https://github.com/SocketCluster/sc-sample-inventory.git
  • Navigate to the sc-sample-inventory/ directory
  • Run npm install (no arguments)
  • Make sure you have bower installed, if not: npm install -g bower
  • Run bower install (no arguments)
  • Run sudo rethinkdb (in a different terminal or in the background - Make sure RethinkDB stays running)
  • Run node server
  • In your browser, go to http://localhost:8000/

Related Repositories

minicart

minicart

The minicart is a great way to improve your PayPal shopping cart integration. ...

sc-crud-rethink

sc-crud-rethink

Realtime CRUD data management layer/plugin for SocketCluster using RethinkDB as ...

sc-collection

sc-collection

Collection model component for Polymer and SocketCluster ...

sc-field

sc-field

Field model component for Polymer and SocketCluster ...

scummvm

scummvm

ScummVM main repository ...


Top Contributors

jondubois