Heat a dry pan and roast the grated coconut, coriander seeds, dry red chilies, cumin seeds, and fenugreek seeds until aromatic and lightly golden.
Allow the roasted ingredients to cool, then grind them with tamarind paste to form a coarse paste, adding minimal water if needed.
Peel the shallots and keep them whole or halve larger ones.
Heat coconut oil in a heavy-bottomed pan and add mustard seeds. When they splutter, add garlic, asafoetida, and curry leaves.
Add the peeled shallots and sauté until they become soft and translucent.
Add the ground coconut-tamarind paste and mix well with the shallots.
Add enough water to achieve a thick curry consistency and bring to a boil.
Reduce heat and simmer until the shallots are completely tender and the curry has thickened.
Season with salt to taste and simmer for 2-3 more minutes before serving.