Sprinkle the courgettes with a pinch of sea salt flakes and lay them on a plate with another plate on top. Put a weight or tin on top to help push out the liquid.
Heat 1 tbsp olive oil in a non-stick frying pan and add the tomatoes and garlic. Cook over a medium heat, stirring, for 5 mins until thickened. Tear in the basil, if using, and season.
Heat the oven to 200C/180C fan/gas 6 and oil a roasting dish. Combine the flours in a bowl. Pour away the water from the courgette. Dip the courgette slices into the egg, then into the flour, and arrange in a layer over the bottom of the dish. Top with a few slices of mozzarella, followed by a layer of the tomato sauce, and repeat with another layer of courgette, mozzarella and sauce. Toss the cheese and breadcrumbs together, then scatter over the top.
Drizzle with a little more olive oil, and bake for 40-45 mins until golden and bubbling. Serve with a herby red onion salad and some bread to mop it up, if you like. Can be frozen for up to two months.