In a pot, heat the coconut oil with the red curry paste. Cook, stirring frequently, until the paste darkens and oozes the fat from the coconut milk.
Add the spices--cinnamon, star anise, green cardamom pods, cloves, nutmeg and turmeric--to the pot and mix them in. Saute them with the curry paste for a couple of minutes.
Add the jackfruit and potatoes to the pot with the peanut butter or peanut paste, half the coconut milk , roasted peanuts, shallots, sugar, sriracha, tamarind paste and 1 cup water. Mix well, cover, and cook until the potatoes and jackfruit are tender, around 20 minutes. The jackfruit will still have a slghtly chewy texture, which you want.
Add the remaining coconut milk and thin out with more water, if you want. Mix well and let the curry cook another five to 10 minutes. You should see flecks of red oil dotting the curry, which indicates all the ingredients are cooked exactly. Check salt and add more if needed.
Garnish with basil or cilantro.
Serve hot with rice. Sprinkle on some roasted peanuts, if you wish.