Place all the ground ingredients in a food processor and process into a smooth paste. Set aside. Preheat about 1-inch of oil to deep fry the sliced tempeh in batches if necessary. Deep fry until they are golden brown. Drain on an absorbent paper towel and set aside. Alternatively, you can also put about 1 Tbsp of oil in a large non-stick skillet and pan fry them on 1 layer until they are crispy
In a large skillet or wok, preheat about 2 Tbsp of oil. Add the ground ingredients and stir fry for 3 minutes. Add shrimp paste, tamarind paste and palm sugar. The sambal turns darker and thicker as the sugar caramelizes. Add roasted peanuts (if you use) ,the fried tempeh and stir to mix everything to make sure the sambal sauce is coating everything evenly. Have a taste and season with more salt and sugar as needed. It should be spicy, sweet, and slightly tangy