The Chocolate Cupcake
Preheat the oven to 160°C (315°F/Gas 2–3). In a saucepan, melt the pieces of chocolate with the butter and cocoa powder, stirring regularly. Remove from heat. Whisk together the egg yolks and sugar until thick and pale. Beat the egg whites until stiff peaks form. Combine the dry ingredients in a bowl. Gradually add the combined dry ingredients to the egg yolk and sugar mixture. Mix well, then pour in the melted chocolate–butter mixture while stirring. Carefully fold in the beaten egg whites using a spatula. Fill muffin tins with paper liners and divide the batter between them. Cook in the oven for about 20 minutes. Allow to cool. Turn out the cupcakes and spread frosting on each one using a spatula.
The Coffee Frosting
Beat the butter and sugars together in a food processor or with a spatula until smooth. Add the coffee and the coffee extract and mix again vigorously in the processor or with the spatula for at least 5 minutes until the mixture becomes creamy. It is then ready to use.