Mix together all of the spices to create the spice mixture. Heat a pan on medium heat and saute the minced onion with olive oil, one cinnamon stick, and a pinch of salt. When the onion starts to caramelize, add garlic and saute for another 2 minutes. At this point, add in the tomato puree along with half of the spice mixture. Bring the heat down to low and simmer, stirring frequently, for 8-10 minutes.
While the tomato sauce is simmering, cook the rice according to package instructions but add a cinnamon stick and the spices to the water. When cooked, mix in a drizzle of olive oil.
Also, cook the elbow pasta according to package instructions and meanwhile, cook the canned chickpeas in boiling water for 3-5 minutes before drying them and tossing with a drizzle of olive oil. Cook the brown lentils according to package instructions.
In another pan, bring ½ cup oil to medium-high heat and then add in the sliced onions. Fry them for a few minutes until they become golden brown before letting them cool and dry on paper towels.
At last, it is time to assemble the koshari. Start with a base of rice, then the cooked elbow pasta, then the tomato sauce, then lentils, then chickpeas before topping with the fried onions.