A port(ish) of the Brain API to Ruby on Rails