Peel and dice the potato and finely chop the onion. In a medium saucepan, add the lentils with 2 cups of water. Cover, bring to a boil then turn down the heat to simmer still covered.
Cook the lentils are just barely al dente and drain away any remaining liquid.
While lentils are cooking, add the chopped onion and oil to a large pan. Cook around 5 minutes until translucent, stirring periodically.
Add the potatoes and cook another 5 minutes covered, adding a bit of water if the pan is getting to dry.
Add all the spices, stir and cook another minute.
Add the cooked lentils to the pan and the remaining ingredients, except the baby spinach. Stir, cook at a gentle simmer for around 10 minutes until the potatoes are fork tender.
Add in the spinach, stir, cook another minute or two until the spinach is wilted.
Serve with red chili flakes if desired.