Make the Rice: Heat 2 tablespoons of olive oil in a medium saucepan over medium-high heat. Add the rice and fry it for 2 minutes, then add the vegetable stock. Bring it to a boil, decrease the heat to low, cover and simmer for 15 minutes or until the rice is cooked.Make the Lentils: Rinse the lentils under cold water and add them to another medium saucepan with 2 cups of water. Add the garlic, cumin and bay leaf and bring it to a boil. Reduce the heat to low, cover and simmer for 20-30 minutes or until the lentils are tender. Once cooked, add the salt and stir to combine. Strain any excess liquid if necessary.Make the Macaroni: Cook the macaroni according to package instructions until al dente.Leave each of these in the pot to keep warm and set aside.
Make the Crispy Onions: Heat the oil in a skillet. Add the onions and fry until dark brown. Using a slotted spoon, remove them from the oil and place them on paper towels to drain and cool.
Make the Sauce: Heat the oil in a medium saucepan over medium-high heat and add the onion. Cook until soft and translucent, about 5-7 minutes. Add the garlic and saute until golden brown. Add the tomato sauce, baharat, salt and pepper to taste, chile flakes (if using) and red wine vinegar. Bring it to a simmer, reduce the heat to low, cover and simmer for 20 minutes, stirring occasionally.
Assemble the Koshari: Add the rice, lentils and macaroni to a large bowl and toss to combine (or simply scoop out desired amounts of each onto the plates). Sprinkle a little baharat over each portion and serve topped with some of the spicy tomato sauce. Top with garbanzo beans, the crispy onions and another sprinkle of baharat. Serve warm.Note: Each of the components can be made well in advance and then simply reheated and assembled.