Marinate the chicken with the turmeric, salt, cili boh and coconut (or breadcrumbs) if using, and set aside.
Mix all the sauce ingredients in a small bowl and set aside.
Peel, halve, then slice the onion thinly.
Finely chop the garlic and slice the red chillies.
Heat the oil in a wok or frying pan on medium heat and brown the chicken thighs for 5 minutes, flipping over halfway. Take them out and set aside.
If you've used shredded coconut or breadcrumbs, strain the hot oil through a metal sieve to get rid of all the burnt bits.
Wipe the wok dry and add about 3 Tbsp of the oil back to the wok on medium heat.
Fry the onions for 2 minutes, add the chillies and garlic and fry for another minute.
Add the curry leaves, kaffir lime leaves, sauce and water and mix well.
Add the chicken and a little black pepper, stir, bring to a simmer, reduce the heat to low and cook, uncovered, for 30 minutes until the chicken thighs are cooked through. If it gets too dry, add a little more water.
Stir in the tomatoes and peas, and heat through for just a minute.
Check seasoning and finish off with a squeeze of lime juice. Serve immediately.
