1. Prepare the noodles according to package instructions.
2. In the meantime, peel the shallot, halve it, and cut it into fine rings.
3. Wash the spring onion and cut the green parts into 3 cm long pieces, which you cut in half lengthwise. Chop the white part finely.
4. Peel the garlic and chop it finely.
5. Cut the tofu into 5 mm cubes.
6. Whisk the eggs in a bowl.
7. Wash the soybean sprouts and drain them.
8. Coarsely chop the peanuts and cut the lime into eighths.
9. For the sauce, mix the sugar, soy sauce, tamarind paste, fish sauce and chili flakes in a bowl with 200 ml of water.
10. Sauté the shallot and white spring onions in a frying pan and add the garlic after 30 seconds.
11. Add the tofu and stir-fry for another 30 seconds.
12. Add the noodles and mix well. Pour in two-thirds of the sauce mixture and stir everything.
13. Using a wooden spatula, move the pasta mixture to one half of the pan and add a splash of oil to the empty area. Pour in the egg mixture, let it set briefly and break it up with the spatula.
14. Once it has set, you can mix it with the rest. Add the rest of the sauce if necessary.
15. Now add soybean sprouts, peanuts, and spring onion greens, mix everything well and keep frying until the spring onion greens have softened a bit.
16. To serve, add lime and chopped coriander on top if you like.
For the vegan version, you can simply omit the fish sauce and use more soy sauce and tamarind paste instead.