In a dry pan, roast 1 cup semolina over medium heat for 3–4 minutes until aromatic and lightly golden. Stir continuously. Remove and set aside.
Heat 2 tbsp oil or ghee in a pan. Add mustard seeds.
Once they splutter, add curry leaves, urad dal, chana dal, and roast until light brown.
Add onions, ginger, green chilies, and sauté until translucent.
Add chopped carrot, peas, and turmeric powder. Cook for 2–3 minutes.
Add 2 cups water and salt. Let it come to a boil.
Reduce the flame to low. Gradually add roasted semolina while stirring continuously to avoid lumps.
Mix well, cover, and cook for 2–3 minutes until the semolina absorbs water and becomes soft. Turn off the heat and let rest for 1–2 minutes.
In a small pan, heat oil and roast peanuts until golden. Add them to the upma and mix gently.
Add lemon juice, chopped coriander, and grated coconut (if using) and mix well.
Serve Upma with south Indian coconut chutney, yogurt, or pickle.