Heat 2 tablespoon coconut oil in a pan and fry the cumin seeds, coriander seeds, red chilies and black pepper and curry leaves.
Add about 12 peeled small onions and 4 cloves of garlic and saute them until the onions are caramelized and soft.
Now add the chopped tomatoes along with turmeric powder, sambhar powder, coriander powder and salt.
Cook the tomatoes until they are soft and mushy. This takes about 10 minutes on low to medium flame.
Add the freshly grated coconut and saute for 2 more minutes and turn off the flame.
Let the mixture cool down and then grind it to a very smooth paste. Grind the mixture once and then add about a cup of water and grind until it is very smooth.
Now heat another pan (or wipe down and use the same pan). Add 2 teaspoon of coconut oil and fry the thinly sliced onions.
Also add the curry leaves as well and once the onions are translucent, pour in the ground masala paste.
Add about 1 ½ cups to 2 cups of water and wash the mixer jar and pour it into the pan.
Mix well and let the mixture come to a boil. Let it simmer for about 7 to 10 minutes and then serve hot with idli or dosai!