To make the broth
Put the shallots, ginger, chillies, garlic and carrots in a food processor and pulse to get a coarse mash. Heat some oil in a pot and fry the mash for 6-8 minutes.
Add the remaining ingredients except the tamarind. Simmer for 30 minutes, then let stand another 30.
Strain through a sieve and return the liquid to the pot. Stir in the tamarind, taste and season with salt.
To make the tofu, greens and noodles
Deep-fry the thin vermicelli in a saucepan until lightly coloured. Remove onto kitchen paper and leave to crisp.
Whisk together the sambal oelek, water, tamari, lemon and sugar. Place the tofu slices in the marinade for just ten minutes.
Heat a little oil in a wide frying pan. Fry the tofu slices until well-browned on both sides. Pour a tablespoon of marinade over each slice and continue to cook over high heat, shaking the pan occasionally, until the marinade reduces and coats the tofu.
Steam the greens briefly. Heat the broth gently.
Cook the wide rice noodles in boiling water until tender. Drain in a colander.
Pour a generous ladle of broth into each bowl. Place the noodles in the bowl and arrange the greens and tofu slices on top. Garnish with the crisped vermicelli.