Personalization of suggestions of contents plays a key role in adaptive virtual learning environments. Good recommendations can raise the interest of students in the learning process, while, on the other hand, bad recommendations can have catastrophic results for the learning process. The affective state of the student is a very influential factor in the learning process. In this work, a generic architecture of an affective recommender system for e-learning environments is developed, to serve as a guide for future implementations of this kind of recommender system. Here, the affective characteristics of students are represented by their personalities, learning styles, emotional states, and expertise levels. Thus, the main contribution is the proposition of a generic architecture of an affective recommendation system for the educational field. The architecture is completely modular, which gives it great flexibility because the emotion engine is separated from the personal characteristics engine, and is not based on specific models of emotions. This work finishes with examples of use cases of the architecture. According to the results in these examples, our architecture is capable of analyzing the polarity of academic documents based on their content, determining the personal characteristics of students (including their emotions), and from there, recommending learning resources to students considering emotions as the main element of the process.