Make the crispy onion topping.
Sprinkle the onion rings with salt, then toss them in the flour to coat. Shake off excess flour. Flour is optional.
In a large skillet, heat the cooking oil over medium-high heat, cook the onion rings, stirring often, until they turn a nice caramelized brown. Onions must be crispy, but not burned (15-20 minutes). Keep the oil for cooking the koshary.
Make the Tomato Sauce.
In a saucepan, heat 1 tbsp cooking oil. Add the grated onion, cook on medium-high until the onion turns a translucent gold (do not brown). Now add the garlic, coriander, and red pepper flakes, if using, and saute briefly until fragrant (30-45 seconds more).
Stir in tomato sauce and pinch of salt. Bring to a simmer and cook until the sauce thickens (15 minutes or so).
Stir in the distilled white vinegar, and turn the heat to low. Cover and keep warm until ready to serve.
Make the Koshari
Mix the rice and the lentilles in a pot.
Add the oil used for the onion.
Make sure all the rice is coated with oil.
Add a 3 1/2 cups of water.
Bring to a boil.
Cover and Reduce heat to minimum until water is absorbed.
Cook the macaroni, strain, do not oil.
Put it All Together!
To serve, fluff the rice and lentils with a fork and transfer to a serving platter. Top with the elbow pasta and 1/2 of the tomato sauce, then the chickpeas, and finally 1/2 of the crispy onions for garnish. Serve, passing the remaining sauce and crispy onions