• Stars
    star
    324
  • Rank 129,708 (Top 3 %)
  • Language
    JavaScript
  • Created over 9 years ago
  • Updated about 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Sample real-time CRUD inventory tracking app built with SocketCluster

sc-crud-sample

Scroll to the bottom for installation instructions.

A sample inventory tracking realtime single page app built with SocketCluster (http://socketcluster.io/), VueJS 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, VueJS 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

Keep in mind that this app is optimized for cutting-edgeness, not for backwards compatibility with older browsers.

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 setup and 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/)
  • Run git clone https://github.com/SocketCluster/sc-crud-sample.git
  • Run cd sc-crud-sample (to navigate to the sc-crud-sample/ directory)
  • Run npm install (to install back end modules)
  • Run cd public && npm install && cd .. (to install front end modules inside the public/ directory)
  • In a different terminal (or in the background), run sudo rethinkdb (make sure RethinkDB stays running)
  • Run node server (to launch the server)
  • In your browser, go to http://localhost:8000/

More Repositories

1

socketcluster

Highly scalable realtime pub/sub and RPC framework
JavaScript
6,151
star
2

loadbalancer

A sticky load balancer optimized for realtime apps
JavaScript
310
star
3

socketcluster-client

JavaScript client for SocketCluster
JavaScript
293
star
4

socketcluster-server

Minimal server module for SocketCluster
JavaScript
108
star
5

ndata

A deep key-value store for Node.js (server and client pair)
JavaScript
78
star
6

asyngular

Highly scalable realtime framework compatible with SocketCluster
JavaScript
77
star
7

client-drivers

List of SocketCluster clients
45
star
8

sc-redis

Redis adapter for SocketCluster
JavaScript
45
star
9

plugins

List of SocketCluster http://socketcluster.io plugins - Pull requests welcome.
33
star
10

sc-crud-rethink

Realtime CRUD data management layer/plugin for SocketCluster using RethinkDB as the database
JavaScript
33
star
11

sc-codec-min-bin

Minimal binary codec for SocketCluster based on MessagePack
JavaScript
24
star
12

socketcluster-client-ios

Native iOS client for SocketCluster
HTML
23
star
13

writable-consumable-stream

An async stream which can be iterated over using a for-await-of loop.
JavaScript
21
star
14

sc-stateless-presence

Plugin for checking user presence in SocketCluster. Optimized for front end use.
JavaScript
20
star
15

asyngular-server

Minimal server module for Asyngular
JavaScript
19
star
16

stream-demux

An alternative to using event listeners; improves control flow whilst helping to avoid memory leaks.
JavaScript
18
star
17

baasil-cli

A CLI tool for creating and deploying cloud native apps to Rancher + Kubernetes infrastructure
JavaScript
18
star
18

scc-state

Cluster state tracking and notification engine for SocketCluster clusters.
JavaScript
16
star
19

socketcluster-website

The SocketCluster website
JavaScript
14
star
20

sc-broker

Default broker client-server pair for SocketCluster
JavaScript
13
star
21

asyngular-client

JavaScript client for Asyngular
JavaScript
13
star
22

scc-broker

Server for the SC cluster - For horizontal scalability.
JavaScript
11
star
23

sc-rabbitmq

RabbitMQ adapter for SocketCluster
JavaScript
9
star
24

socketcluster-client-android

Native Android client for SocketCluster
HTML
8
star
25

iocluster

Realtime clustering engine for SocketCluster
JavaScript
7
star
26

async-stream-emitter

EventEmitter using async iterable streams
JavaScript
7
star
27

sc-auth

Auth module for SocketCluster
JavaScript
7
star
28

consumable-stream

Readable async iterable stream.
JavaScript
6
star
29

fleximap

A flexible hash map which supports working with deep, multidimensional keys.
JavaScript
5
star
30

eetase

EventEmitter to AsyncStreamEmitter converter.
JavaScript
4
star
31

sc-channel

Channels for SocketCluster
JavaScript
4
star
32

skeleton-rendezvous

Node.js module for performing fast rendezvous (HRW) hashing with skeleton - Can efficiently handle a large number of machines/sites.
JavaScript
4
star
33

socketcluster-client-edge

JavaScript
4
star
34

sc-stress-tests

Stress test client tool for SocketCluster
JavaScript
4
star
35

agc-broker

Server for the Asyngular cluster - For horizontal scalability.
JavaScript
2
star
36

sc-field

Field model component for Polymer and SocketCluster
HTML
2
star
37

made-with-sc

A list of projects using SC
2
star
38

sc-simple-broker

Simple broker engine for socketcluster-server
JavaScript
2
star
39

sc-broker-cluster

Broker cluster engine for SocketCluster
JavaScript
2
star
40

sc-errors

Error types for SocketCluster
JavaScript
2
star
41

ncom

A TCP socket pair which trigger a 'message' event only when the full message has been received.
JavaScript
2
star
42

sc-emitter

Emitter implementation (based on component-emitter) with support for Node.js error domains
JavaScript
2
star
43

sc-formatter

Module for serializing and unserializing SocketCluster messages
JavaScript
2
star
44

scc-broker-client

Client for SCC - For horizontal scalability.
JavaScript
2
star
45

sc-collection

SocketCluster collection component for the front end
JavaScript
2
star
46

sc-hot-reboot

Automatically reboot workers when code changes.
JavaScript
2
star
47

agc-state

Cluster state tracking and notification engine for Asyngular clusters.
JavaScript
1
star
48

ag-crud-sample

Sample real-time CRUD inventory tracking app built with Asyngular
JavaScript
1
star
49

sc-model

SocketCluster model component for the front end
JavaScript
1
star
50

sc-framework-health-check

Health check plugin for SocketCluster
JavaScript
1
star
51

scc-semver-report

This micromodule tries to find and report any incompatible components on all servers in your SocketCluster Cluster
JavaScript
1
star
52

ag-request

Asyngular request object
JavaScript
1
star
53

scc-integration-tests

Integration tests for SCC
JavaScript
1
star
54

expirymanager

An object for efficiently managing key expiries for in-memory databases
JavaScript
1
star
55

sc-cluster-state-client

Client for sc-cluster-state-server
1
star
56

ag-collection

SocketCluster collection component for the front end
JavaScript
1
star
57

ag-simple-broker

Simple broker engine for Asyngular
JavaScript
1
star