While ray tracing of solar cells was established decades ago, ray tracing of entire modules has met obstacles, mainly because module optics are affected by geometric structures varying over a large scale of dimensions. In this paper, we introduce a ray tracing framework that is based on a modular structure made up of separate plugins. While existing plugins can be used for common effects such as light sources, absorption in materials, etc., specialized plug-ins can be written by users to handle problem-specific properties. We demonstrate the functionality of our approach by ray tracing a test module containing 9 crystalline Si solar cells. Good agreement between light-beam induced current (LBIC) measurements and ray tracing is achieved.