Preheat the oven to 180C/350F/gas mark 4. Grease a 20cm/8inch square cake tin and line with baking parchment.
Mix together the ground flax seed and the water in a small bowl, set aside.
Whisk together the plain flour, cocoa powder, bicarbonate of soda, baking powder, salt and instant espresso powder in a large bowl.
Add the light brown soft sugar, grated cooked beetroot, vegan mayonnaise, sunflower oil, vanilla extract, cider vinegar and the flax seed mixture and stir everything together until well combined. The batter should be very thick, don't be tempted to add more liquid!
Scrape the batter into the prepared tin and spread it level. Bake for 35-45 minutes until a skewer inserted into the centre comes out clean or with a few moist crumbs but no wet batter.
The cake is very delicate so leave it to cool in the tin for at least 20 minutes before you gently turn it out onto a wire rack to cool completely.
To make the chocolate avocado frosting, place the avocados in a food processor along with the sifted cocoa powder, agave or maple syrup, melted coconut oil and vanilla extract.
Blend until smooth then scrape down the sides of the food processor and continue to blend until very smooth and glossy. This can take a little while so be patient and scrape down the sides of the food processor again as needed.
Place the cake on a serving board and spread over the frosting, top with chocolate shavings if you like and serve.