Pound the lemon grass and ginger with a mortar and pestle to pulverize. Add the sambal oelek, soy sauce, turmeric, sugar, and salt, and mix well to form a paste. Add the tofu and turn gently to coat evenly. Marinate for 30 minutes or longer.
Heat 1 tablespoon oil in a small sauce pot over low heat. Add the onions and garlic. Season with salt. Let cook covered 1 minute, add 1 tablespoon water, and continue to cook, covered, until the onions are translucent and soft—approximately 5 to 8 minutes. Set aside.
Heat 1 tablespoon oil in a large non-stick frying pan over medium heat. Add the marinated tofu (there should be enough room in the pan for all the tofu pieces to be in a single layer). Shake pan slightly and let the tofu brown all over, using chopsticks or a wooden spoon to turn the pieces periodically so they cook evenly. Cook, uncovered, until tofu is lightly browned. Remove from heat and transfer to a heated platter. Set aside.
Add 1 tablespoon oil to frying pan and toss in the onion mixture. Cook over medium heat until onion is tender. Add tofu to warm. Adjust seasoning with a pinch of salt and sugar. Add half of the peanuts and Thai basil leaves. Remove from heat.
For the farro or rice:
Heat a sauté pan over high heat and add oil. When the oil is hot, add the mushrooms and sauté until just tender. Add the garlic, shallots, and long beans, and cook until hot and aromatic. Add the cooked farro or rice to the mushrooms and beans and divide between 6 individual serving plates.
Place a portion of the tofu on top of the rice. Toss the micro greens with the lemon grass vinaigrette. Place on top of the tofu. Garnish with the fried shallots.
Drizzle the dish with a little lemon grass vinaigrette and sprinkle with the remaining peanuts.
In a small saucepan, bring the lemon grass, vinegar, and sugar to a boil over high heat. Reduce the heat to medium and boil until the liquid is reduced by about half, about 20 to 25 minutes.
Remove from the heat and strain, discarding the lemon grass. Add the remaining vinaigrette ingredients, mix well, and refrigerate until ready to serve. Note: For a vegetarian version of this sauce, replace the fish sauce with soy sauce.
Spread the shallots out on paper towels and allow to air dry for 30 minutes.
Combine the shallots and oil in a skillet and bring to a slow boil. Reduce the heat to low and cook until the shallots are golden, about 15 minutes. Stir so the shallots brown evenly.
Remove with a slotted spoon or strain the oil through a wire-mesh sieve. Transfer the shallots to a plate or tray lined with paper towels. Discard the oil or save it for later use in stir-fries. Once cool, the shallots are ready to use. If stored in a jar with a tight lid at room temperature, the shallots will keep up to 1 week.