Heat ghee in a pan, add coriander powder and on medium flame cook for 3-4 minutes until you get aroma out of it. Take out the roasted coriander powder in a bowl.
Add coconut crumbs in pan, stir continuously and cook for 2 minutes. Take out the roasted coconut crumbs in the bowl.
Now add muskmelon seeds in the pan and stir continuously until the seeds get roasted well. (If the seeds crackle too much then cover the pan with a lid and then roast the seeds. They get roasted very quickly.)
Peel cardamom and make powder out of it.
Add sugar and less then ½ cup of water. After the sugar melts, cook for 2 minutes more. Add roasted coriander powder, coconut crumbs, cardamom powder and muskmelon seeds. Mix well and cook until you get a thick consistency. Check the consistency of the mixture. If you find the mixture is still wet then cook for 1-2 minutes more.
Grease a plate or tray with ghee and take out the mixture in a plate. Spread it evenly. After the barfi freezes up cut into any shape or size as per your desire.
Dhaniya barfi is now ready. Firstly keep it as prasad for lord Krishna then distribute it among other as well. It can be stored for 15 days in refrigerator.