Wash and soak the rajma or kidney beans overnight. Drain the water which was used to soak the rajma.
Pressure cook the rajma with adequate water along with 1 bay leaf, 1½ inch cinnamon, 2 cloves, 2 green cardamom, 1 inch ginger cut in juliennes, 2 teaspoon salt. If you are using pressure cooker, cook for around 6-7 whistles and if you are using IP or multipot, cook in bean chilli mode for 17 minutes. It is important to cook the rajma just right and it should not get mushy.
Once the pressure is released, drain the stock from the cooked rajma and keep aside. Cool the cooked rajma completely.
Wash and soak basmati rice for around 20-30 minutes.
Take a large pan and add around 3½ cups of water and add the remaining whole spices (2 bay leaves, 2 cloves, 2 green cardamom, 1 star anise, 1 marathi moggu and 1½ inch cinnamon), 1 tablespoon ghee and 1 teaspoon salt (or taste) and bring to boil.
Now add the soaked and drained basmati rice and cover and cook on high flame for around 8 to 9 minutes or till the rice is around 75 to 80% cooked.
Drain the water from the rice using a colander and let the rice cool down completely (you could spread the rice well on a large plate)
Dice 3 large onions to thin slices as shown in picture. Separate the slices well.
Blanch 2 tomatoes and remove the skin and blend to a puree.
Heat oil in a kadai and deep fry the onion in batches on a medium to low flame (while stirring in between) till they are golden brown in colour. Drain the onions on a kitchen paper towel and they could crisp up once cooled.
Dissolve the saffron strands in around 3 to 4 tablespoons of hot water and pound in pestle and mortar. Keep this aside.
In a heavy bottomed handi, add 3 tablespoon ghee and add 2 green chillies and roughly diced 2 medium sized onions, 1 tablespoon ginger garlic paste and sauté for 2 to 3 minutes.
Now add the tomato puree, turmeric powder, kashmiri red chilli powder, dhaniya powder and biryani masala and cook on medium flame for around 5 minutes or till the oil separates. Add little salt if required (however note that we would be adding the rajma stock later which also has salt).
Whisk 4 tablespoons of curd till it is smooth. Now add the curd to the masala mixture and mix continuously on low flame (else the curd could get split)
Now add the cooked rajma and some fresh chopped coriander leaves and cook for couple of minutes.
Now add some of the reserved rajma stock till the rajma is just covered with water. Bring it to a gentle boil.
Now reserve half of the rajma from this in a separate bowl. Make sure that the bottom layer of rajma has more gravy as compared to the reserved one.
Layer half of the par cooked basmati rice over the rajma in handi. Add some fried onions, half of the mint leaves and some chopped fresh coriander leaves as well.
Now add the reserved rajma and repeat the layer using remaining rice, fried onions, mint and coriander leaves.
Now using a fork prick 4 to 5 holes in the top layer of the rice and pour the soaked saffron water and 1 tablespoon of ghee.
Now cover the handi either using aluminium foil or dough on the sides and cover with lid tightly. Cook on dum on low flame for 20 minutes.
Open the lid and slightly fluff up the rice and let the it rest for around 5 minutes before serving. Do not mix completely and just serve by taking portions from different layers.