Soak the rice noodles in cold water for about 20 minutes or until soft.
While the noodles are soaking, prepare the sauce by combining tamarind concentrate, fish sauce, brown sugar, and soy sauce in a bowl. Mix well until the sugar has dissolved.
Heat oil in a large pan or wok over medium-high heat. Add minced garlic and chopped shallots, and sauté.
If you're using chicken or shrimp, add them to the pan and fry until fully cooked.
Push the protein to one side of the pan and crack an egg into the space. Quickly scramble the egg.
Drain the soaked rice noodles and add them to the pan along with bean sprouts and sliced tofu (if desired).
Stir-fry everything together for a few minutes until well combined.
Pour the sauce over the noodle mixture in the pan, ensuring that everything is evenly coated in the sauce.
Continue cooking for another 1 - 2 minutes, stirring constantly, until all ingredients are heated through and well mixed.
Remove from heat and serve immediately, sprinkling the chopped peanuts on top.