In recent years, the software applications for medical assistance, including the telerehabilitation, have known a high and a continuous presence in the medical area. The ePHoRt is a Web-based platform for the remote home monitoring rehabilitation exercises in patients after hip replacement surgery. It involves a learning phase and a serious game scheme for the execution and evaluation of the exercises as part of a therapeutic program. Modular software architecture is proposed, under the patient perspective, to be used as a reference model for researchers or professionals who wish to carry out tele-rehabilitation platforms, and to guarantee security, flexibility, and scalability. The architecture incorporates two main components. The first one manages the patient' therapeutic programs taking into account two principles: 1) maintain loose coupling between the layers of the framework and 2) Don't Repeat Yourself (DRY). The second one evaluates the performed exercises in real time considering an independent acquisition mechanism for the patient movements and two artificial algorithms. The first algorithm allows evaluating the quality of the movements, while the second one allows assessing the levels of pain intensity by recognizing the patient' emotions when performing the movements. Details of the components and the meta-model of the architecture are presented and discussed considering their advantages and disadvantages.