There is a gap in open-source robotic platforms that can be customized according to application needs and available resources. Software systems for robots are usually complex due to the need to control multiple sensors and actuators in real time, while simultaneously and asynchronously performing tasks and responding to unexpected situations. In this context, a well-designed architecture that could facilitate building and using robots is desirable. This work proposes a framework for the development of control systems for social robotics platforms. The framework is modular and easily extensible, as it uses an object-oriented approach and adopts the publish-subscribe paradigm for asynchronous message exchange between modules. The framework proposed in this work was instantiated for the design and implementation of two open-source social robots, demonstrating its adaptability and extensibility in different scenarios. We expect that this work will contribute to popularizing the use of low-cost social robots in the areas of education and healthcare.