Finely mash 50 g tofu. Mix flour with baking powder in a bowl. Add margarine, 1 egg, 1 pinch of salt and tofu. Knead first with the dough hooks of the hand mixer, then with your hands to a smooth dough.
Grease a tart mould (22 cm Ø). Roll out the dough on a well floured work surface until round (approx. 26 cm Ø). Line the mould with it, cut off any protruding edges. Put it in a cold place.
Clean and peel the carrots and cut them into diagonal slices. Peel onions and garlic, finely dice garlic, cut onions into strips. Heat oil in a pan. Sauté the carrots for about 5 minutes at medium heat.
Finely dice the tomatoes. Wash the thyme and shake dry. Remove leaves and chop finely, except for a little to garnish. Add the onions and garlic to the carrots and fry for about 2 minutes. Finally add the tomatoes and thyme, season with salt and pepper, remove from heat and let cool.
Puree 150 g tofu with 4 eggs, season with salt and pepper. Spread about 2/3 of the tofu mixture on the base. Add the carrot mixture and spread the rest of the tofu cream on top. In a preheated oven (electric cooker: 200 °C/ convection oven: 175 °C/ gas: see
manufacturer) bake for approx. 30 minutes on the lower rack. Cover with foil for the last 5 minutes if necessary. Remove and let cool down briefly. Serve garnished with remaining thyme. Lactose-free sour cream tastes good with it.