If starting with raw peanuts, pre-heat the oven to 180 °C (356 °F) (160 °C (320 °F)) and roast the nuts until golden (15-20 minutes). Set aside to cool.
Bring a large pan of seasoned water (1 tbsp of salt per litre) to a boil.
If making your own crispy shallots, peel and finely slice them. Line a large plate with kitchen paper. Put the shallot slices in a small saucepan and add the groundnut oil. Fry the shallots over medium-low heat until deep golden (8–10 minutes), stirring regularly. Use a slotted spoon to transfer them onto the kitchen paper and sprinkle with a little salt.
Prepare the veg: Slice the cabbage and cut the beans into 4 cm pieces. If using water spinach, trim any thicker stems and add them to the beans. Blanch the vegetables (apart from the cucumber) separately until just tender. The cabbage and beans take around 3 minutes, the spinach and beansprouts 1 minute. Then transfer them to iced or cold water, strain once cooled down and set aside. Cut the cucumber in half lengthways and thinly slice it.
Coat the tofu evenly with the turmeric, coriander, salt and 1 tablespoon of the oil.
Heat the remaining 2 tablespoons of oil over medium heat in a non-stick frying pan. Fry the tofu slices until golden on both sides (3-4 minutes total). Transfer to a board, cut into mouth-sized pieces and set aside.
If using seedless tamarind, soak it in 150ml boiling water for 10 minutes. When cool enough to handle, use your fingers to loosen the flesh from the fibrous strings. Strain the liquid through a fine sieve into a small bowl and discard the pulp
Trim the chillis, peel the garlic clove and galangal and add them together with the salt to a small food processor. Blend into a purée. Add the peanuts and blend for around 1 minute until they begin to break down to a coarse paste. Then add the palm sugar, tamarind water (or diluted paste) and lime juice and blend to combine. Alternatively, you can grind the paste in a large pestle & mortar or traditional Ulekan Cobek.
Add the cooked vegetables, sliced cucumbers, tofu and dressing to a large mixing bowl and mix well. Then divide over plates and top with the crispy shallots before serving.
