Rinse your green or brown lentils under cold water until the water runs clear. In a large pot, combine the lentils with 3 cups of vegetable broth or water. Bring to a boil, then reduce to a simmer and cook for about 15-20 minutes until they are tender but not mushy. Drain any excess liquid and set aside.
In the same pot, add 3 cups of vegetable broth or water. Bring to a boil, then add the basmati rice. Stir in 1 teaspoon of salt and cover, reducing the heat to low. Cook for about 15 minutes or until the rice is fluffy and has absorbed all the liquid. Remove from heat and let it sit covered for 5 minutes before fluffing with a fork.
While the rice is cooking, heat the vegetable oil in a skillet over medium heat. In a bowl, toss the sliced onions with the flour until they are well-coated. Once the oil is hot, add the onions to the skillet. Cook, stirring occasionally, until they are deep golden brown and caramelized, about 15-20 minutes.
In a small skillet, toast the coriander and cumin seeds over medium heat until fragrant, about 2-3 minutes. Allow them to cool slightly, then grind them in a spice grinder or mortar and pestle. Add the ground spices, along with the allspice, cinnamon, turmeric, and black pepper, to the cooked lentils and mix well.
Gently fold the cooked lentils into the rice, ensuring everything is well combined. Taste and adjust seasoning with more salt if necessary.
To serve, pile the Mujadara on a platter and top generously with the caramelized onions. Garnish with chopped cilantro and serve alongside lemon wedges for a bright finish.