In a heavy bottomed pan heat the ghee on a medium low heat till it melts.
Once the ghee has melted, add the atta and start toasting on medium- low heat, stirring constantly until the wheat flour gets golden brown color and you smell a nutty aroma. Do not rush this step else the flour will remain raw.It should take about 10-12 minutes and you will see golden brown melted ghee & flour slurry in the pan.
Meanwhile, on the second stove, in a sauce pan, heat water on high. Switch off the stove and add jaggery. Stir until jaggery completely dissolves. If you have broken jaggery from the block and the big chunks are taking time to dissolve, heat up the water a little bit (but do not let it boil). Let sit near to stove.
Once the wheat flour has turned dark brown and it has roasted nicely,reduce heat to low and very carefully pour in the jaggery water into the roasted wheat-flour. It will splutter so be careful. Add the cardamom powder as well.
On low heat, stir quickly and continuously (to avoid lumps) and cook for a minute or less until the mixture turns smooth.Once you add the water, the mixture will immediately clump up and increase in volume. Do not cook for long time else the halwa will thicken and turn dry.
Mix in the nuts and raisins (if using ) and combine. Serve the halwa warm or at room temperature.