This is a very good question, but in this case, the answer is very simple. Instead of grains, you can use cauliflower rice, zucchini noodles, or sweet potatoes. As for legumes, replace them with other protein-rich vegetables, nuts, and seeds.