Chettinad chicken - Fiery Chicken Curry from South India

Ingredients (Serves 3-4)

Marinate for 20 minutes:-

2 lb/ 1 kg chicken drumsticks or thigh portions, skinned (use any dark meat portions, bone in pieces recommended)
1 tbsp fresh lemon juice
1 tsp red chili powder
1 tsp salt

Spices to be Dry Roasted :-

1.5 tsp white poppy seeds
1 tsp fennel seeds
2 tsp coriander seeds
1.5 tsp cumin seeds
5 cloves
10-12 dry red chilies (adjust to tolerance)
4 whole green cardamom
1/2 cup fresh grated coconut
Water for grinding (about 1/4 cup)

For the Sauce:-
4 tbsp mustard/canola/vegetable oil
1/2 cup sambhar onions, chopped 
2" cinnamon stick
2 star anise
2 tbsp each grated fresh ginger & garlic
 8-10 curry leaves (available at indian stores)
1.5 tsp red chili powder (adjust to tolerance)
1.5 tsp turmeric powder
1 cup tomatoes, chopped
3-5 Thai green chilies, chopped fine (adjust to tolerance)
Salt to taste
1 tbsp fresh lemon juice (adjust to taste)
Fresh grated coconut (for garnish)
Chopped cilantro / curry leaves ( for garnish)

 Notes:-  

Sambhar Onions can be  substituted with shallots or equivalent quantity of chopped red onions.
Fresh coconut can be substituted with unsweetened grated coconut.
 Method :-

In a medium saucepan, first dry toast all the spices except fresh coconut for 2 minutes on low heat till you smell the aroma.
Next, add the grated coconut to the pan and toast till the coconut starts to change color lightly and drying out. About 8-10 minutes.
Once done, remove pan from heat & allow cooling. Grind the cooled spices & coconut to a paste using 1/4 cup of water or as required for grinding. 
The paste doesn't have to be silky smooth. Set aside.
In a heavy bottomed pot, heat the oil on medium till it starts to smoke lightly. 
Add chopped onions and cook with regular stirring till they are translucent but not browned. About 5-7 minutes.
Next, add the cinnamon stick & star anise and cook for 18-20 seconds till you smell the aroma of whole spices.
Add in the grated ginger and garlic, curry leaves & ground spice paste and red chili & turmeric powder. Cook for 2 minutes.
Next, reduce heat to low, add the chopped tomatoes, mix in 
cook uncovered for at least 12-15 minutes with regular stirring till oil starts separating on sides of the pot.
Add in the marinated chicken & chopped green chilies next, mix, check the salt & adjust, increase heat to high and let cook for 3 minutes. 
Next, reduce the heat to low, cover the pot & let the chicken cook with the spices & its own juices for 12-15 minutes or till tender 
(This cooking time will depend on size of your chicken pieces)
Uncover the pot, check if the chicken pieces are tender else cook for another 2-3 minutes. 
Once chicken pieces are cooked, turn off the heat, add the lemon juice to liking, cover & let sit covered till ready to serve.
When ready to serve, garnish with chopped cilantro/ curry leaves/fresh coconut.Serve with warm rice.