Implementation of the basic logic with coffee script and knockout js