Dharmashastra is a genre of Sanskrit texts that provides guidelines for ethical and moral duties in Hindu society. It covers a wide range of topics, including social, religious, and legal codes. Dharmashastra texts are traditionally attributed to ancient sages and are considered authoritative sources of moral principles in Hindu tradition.