In a thick bottomed pan, heat up 1 cup sugar + 1/4th cup water (on medium heat), stirring intermittently, till you get a very light boil.
Also, as soon as you switch on the flame for the sugar syrup - in a separate pot, start heating the 1 cup melted ghee on a low flame. It is important to start heating the ghee at the same time, so that the ghee is warm enough, without getting overheated/burnt.
Once you see the light bubbles on the sugar syrup, add 1/2 cup sieved besan to this sugar syrup, and mix it in, stirring continuously, to ensure no knots are formed in the besan flour.
Once the besan is all mixed in, add the hot ghee (slowly, in 3 parts), and ensure to stir continuously, till all the ghee is mixed in. It is important to add about 1/3rd cup of ghee at a time, to give time for the sugary besan mix to absorb all the ghee before you add more.
Once you've added all the ghee, just ensure you stir continuously, till you can see all the different layers, and the ghee starts coming out at the sides. At which point, you must switch off the gas, and pour the mix in a container immediately.
After you pour the mix into the container of your choice, it will bubble a little, before it settles down. DO NOT try to flatten it or help it settle in any way. This will mess with the layers that will develop naturally. I’d say leave it alone for 10-15 minutes, and then when it firms up a little, cut it into squares / rectangles to serve.