It's a simple communal dashboard (or information radiator), although perhaps not in the typical sense.
While a lot of dashboards are complex and meant for reacting and driving decision making, nuggets are more about creating general awareness. And looking awesome.
Here's an example - Hudl's concurrent user count:
The number moves up and down in real time.
You can put one up on a spare monitor or a TV, but for maximum #mindblown, you should project it onto a surface:
- Fork this repository
- Create a datasource and a display
- (optional) Get a projector
Still interested? Continue on for more detail.
This project has been the subject of a presentation. See the slides.
The system is just a simple client-server architecture, with a node.js/socket.io server retrieving and curating data, and a browser/socket.io client subscribing to data events fired by the server.
- Stat - A (javascript object) message containing a small piece of data to be displayed.
- Datasource - A node.js module on the server that grabs data from one or more external sources, builds them into a stat, and emits that stat.
- Display - A require.js module in a browser client that consumes stats and renders them.
Datasource modules go in server/user/datasource
.
See a simple, documented Current System Time datasource example.
Display JavaScript, HTML, and CSS goes in server/user/displays
.
For each display you should define exactly one file with the same name. For a display called current-time
, you'll create:
server/user/displays/current-time.js
server/user/displays/current-time.css
server/user/displays/current-time.html
Each of the links above is to an example that works with the system-time
datasource (above).
Note: This assumes you're running the server on linux. For Windows, some additional work may be required.
-
Switch to the
server/
directory and install dependencies withnpm
npm install npm install forever -g
-
Start the server
./start.sh
This uses
forever
to runnode server.js
. You can list running processes withforever list
and stop the server withforever stop server.js
. See theforever
documentation for more details. -
Open up a browser and visit:
http://localhost:42420
to load a displayhttp://localhost:42420/dashboard
to load the nugget control panel
More coming soon.
These are the parts I used that've worked pretty well for me. I'd recommend price shopping a bit for them.