Finely grind all the spices in a spice grinder or mixer and set aside.
Grind grated coconut to a smooth paste. Set aside
Heat 2 tbsp of coconut oil in a large kadai (I use my longpi pot for this). Add the onion, ginger, garlic and saute until the onions have softened.
Now the 1 ½ tbsp of the freshly ground curry powder (of from before if you have), cayenne pepper and grated coconut. Saute for 3-4 minutes till the spices are fragant.
Add the tamarind paste, sugar, chilies, curry leaves, pandan leaves and 1/2 cup of coconut milk. Bring to a boil.
At this point, add salt and crabs. The curry wil be very thick so mix so that it is coating crabs and cook for 5 minutes.
Add the rest of the coconut milk, some water to achieve the gravy consistency. Lower the heat, cover and cook till the crabs are fully cooked. This will take about 10 minutes or so.
Turn off the gas, add chopped coriander leaves or if you have handy a little drumstick leaves. Cover and let it rest for 10 minutes. Serve with steamed rice.