Preheat the oven to 200°C. Line a large baking sheet with parchment paper.
Mix the pesto with the minced garlic. Add the chilli flakes, if liked.
Unroll the pastry and cut out squares (about 8x8cm). Draw a border with a blunt knife on them. Spread a thin layer of pesto over the squares (up to the border line). Put the tarts onto the prepared baking sheet.
Mix the peas with the remaining pesto and scatter over the tartlets.
Cut the tofu into tiny cubes (about 1x1cm). Arrange them on top of the tarts, between the peas.
Bake in in the middle of the oven for 10 minutes until the edges are golden.
Serve warm or at room temperature, with fresh mint leaves scattered on top.