Heat oil or ghee in a pot. Reduce the heat and add the whole spices – tej patta, cinnamon, cloves, green cardamoms, star anise, black cardamom and caraway seeds. Fry for a few seconds so that the spices crackle and release their flavors in the oil. Do not burn them. Add sliced onions. Stirring often, sauté the onions on medium-low to medium heat. Add a few pinches of salt to quicken the process cooking of onions.
Cook them to the point where they become golden and caramelized. Do not brown them too much or burn them or else the biryani will have a bitter taste.
When the onions become golden, switch off the heat. Place the pan on the countertop and remove half of the caramelized onions to set aside. If a few spices from the pan pop in with the onions, that is fine.
Add ginger-garlic paste and place the pan back on the stove-top on a low heat. Sauté ginger-garlic paste for a few seconds until the raw aroma goes away.
At this step we will add the ground spices. If you prefer, switch off the heat here.
Add turmeric powder, kashmiri red chilli powder, coriander powder, cumin powder, garam masala powder and grated nutmeg. Mix and sauté for about 30 seconds to a minute on a low heat taking care not to burn the spices.
Add tomato puree (or chopped tomatoes) and mint leaves. Add coriander leaves if using.
Mix and sauté on a low heat until the mixture becomes pulpy and you see the fat releasing from the sides. If using chopped tomatoes, the tomatoes should soften and become mushy.
Add the prepared soya chunks, frozen green peas (optional) and salt.
Add water and combine well.
Cover the pan and simmer on low to medium-low heat for 10 minutes.
Switch off heat and place pan on the countertop.
Add coconut milk and kewra water (pandanus water) or rosewater. If using curd, add 1 cup whisked/beaten curd at this point. Mix well.NOTE: Use fresh curd and not sour curd. Mix and cook on a low heat until the gravy becomes hot. Do not boil, as this would result in separation of the coconut milk or curd.