"Abu Hurayra reported Allah’s Messenger (SAWS) as saying, “Among the actions and good deeds for which a believer will continue to receive reward after his death are: knowledge which he taught and spread, a good child whom he left behind, a copy of the Qur’an which he has left as a lega- cy, or a Mosque he built, or a house which he built for the traveler, or a stream which he caused to flow, or a Sadaqa which he gave from his property when he was alive and well for which he will continue to receive reward after his death.”
- Ibn Majah and Maihaqi"