Shred the cabbage finely and discard the hard core. Have the coconut ready (thawed and squeezed dry if frozen).
Temper and cook
Heat coconut oil in a heavy pan over medium heat. Add mustard seeds and let them pop fully.
Add urad dal if using and fry until light golden. Stir in curry leaves, green chili, hing, and shallots or onion if using. Saute until the onion softens, about 1 to 2 minutes.
Add turmeric and mix quickly so it does not burn. Add the shredded cabbage and salt. Toss well to coat.
Cover and cook on low to medium heat for 6 to 8 minutes, stirring once or twice. Add 1 to 2 tablespoons of water only if the pan is sticking. Do not flood the cabbage.
Finish with coconut
Uncover when the cabbage is tender-crisp and most moisture has cooked off. Stir in grated coconut and crushed cumin if using. Cook uncovered 1 to 2 minutes until the coconut is warm and the pan looks dry and fluffy.
Taste for salt. Garnish with coriander if you like. Serve hot with rice.
Notes
For Jain or no-onion cooking, skip shallots and rely on hing, curry leaves, and green chili for aroma.Want a little less coconut? Use 1/4 cup. The dish still reads as thoran; it just sits closer to a lighter stir-fry.Do not grind coconut with water. A dry pulse with chili and cumin is fine; a wet paste makes the thoran pasty.Store leftovers in an airtight container in the fridge for up to 3 days. Reheat in a dry pan so it does not steam soft.Leftover thoran is excellent next to curd rice or tucked into a wrap with a spoon of yogurt.