node package manager


English Premier League table model


A Football League model. Put teams and results in, get a league table history out.

  • One language, one Application Layer, one test suite - each used on both client and server (the Holy Grail?)
  • MVC architecture
  • 100% Handrolled javascript and CSS, no dependecies on 3rd party libraries or frameworks
  • Tested in Chrome, Safari, Firefox, Opera
  • HTML5, CSS3, EcmaScript 5


  • Responsive CSS
  • Connection to a live result service

The left and right arrow keys move forward and backward through time.

Watch an animation showing the League transform over time.

$ git clone
$ npm install
$ node cli/app.js

A screencast showing the CLI animation is here.

$ npm test
var league = new League();
league.addTeam({ id: "1", name: "Stoke" });
league.addTeam({ id: "2", name: "Port Vale" });
league.addResult({ date: "10 Sep 2012", homeTeamId: 1, awayTeamId: 2, homeGoals: 6, awayGoals: 0 });
console.log(league.getTable("10 Sep 2012"));