
Soak the rice noodles in warm water for about 15-20 minutes, or until they are pliable but still firm. Drain well and set aside.
In a small bowl, whisk together tamarind paste, fish sauce, soy sauce, palm sugar (or brown sugar), and lime juice. Set the sauce aside.
Heat vegetable oil in a large wok or skillet over medium-high heat. Add garlic and tofu (or shrimp/chicken) and stir-fry for 2-3 minutes until lightly browned.
Push the ingredients to one side of the wok. Crack the eggs into the empty space and scramble them lightly.
Add the soaked rice noodles to the wok and toss to combine with the eggs and other ingredients. Pour the tamarind sauce over the noodles and stir-fry for 3-5 minutes, until the noodles are evenly coated and heated through.
Add bean sprouts, Chinese chives (or scallions), and peanuts to the wok. Stir-fry for another minute until the bean sprouts are slightly softened.
Serve immediately, garnished with extra peanuts, a wedge of lime, and chili flakes (optional).