Smart city and innovative building strategies are becoming increasingly more necessary because advancing a sustainable building system is regarded as a promising solution to overcome the depleting water and energy. However, current sustainable building systems mainly focus on energy saving and miss a holistic integration of water regeneration and energy generation. Here, we present a theoretical study of a solar optics-based active panel (SOAP) that enables both solar energy storage and photothermal disinfection of greywater simultaneously. Solar collector efficiency of energy storage and disinfection rate of greywater have been investigated. Due to the light focusing by microlens, the solar collector efficiency is enhanced from 25% to 65%, compared to that without the microlens. The simulation of greywater sterilization shows that 100% disinfection can be accomplished by our SOAP for different types of bacteria including Escherichia coli. Numerical simulation reveals that our SOAP as a lab-on-a-wall system can resolve the water and energy problem in future sustainable building systems.