Scalaffinity is a library providing core functionality for any social networking Web site based on ratings and recommendations. In other words, it is a generic collective intelligence library. Examples of such sites are Anobii, Rate Your Music, and Filmaffinity. It is designed to act as an out-of-the-box model for such Web applications. Nevertheless, Scalaffinity is fully customizable, extensible, and scalable. It incorporates lessons learned while reading "Collective Intelligence in Action" by Satnam Alag.