Add all the ingredients for grinding- B, to a blender and make a smooth paste, you may add some water if needed, keep aside
Heat oil in a deep pan, add the star anise* and the vegetables, except tofu and herbs, mentioned in ingredients -A, saute for a while
Add the ground spice paste and continue to saute for 3-4 minutes. Mix in the rice flour
Add around 2 cups of water, salt to taste, cover and simmer for 10-12 minutes, add cubed tofu
Add the coconut milk when the veggies are almost done
Add the lemon grass, galangal, kafir lime, basil leaves
Simmer again for some time till all veggies are done and you get the desired consistency
Squeeze in the juice of one lime
Adjust the seasonings, serve hot with boiled rice