Preheat the oven to 180 C.
Make long thin slices of eggplant.
Make a paste mixing all purpose flour and water. Dip eggplant slices in the above paste.
Mix bread crumbs and chili flakes.
Coat them with bread crumbs and chili flakes mixture.
On the griddle, shallow fry the eggplant slices in olive oil.
In a baking dish make a layer of marinara sauce.
Add a layer of eggplant slices. Top it with marinara sauce.
Add grated mozzarella cheese and parmesan cheese.
Repeat the process until all eggplant slices are covered. The top layer should be of cheese.
Cover it with aluminium foil and bake for 10 minutes.
Uncover it and serve it with spaghetti.