Preheat oven to 350°F. Line a 12 cup muffin tin with paper liners. Set aside.
In a medium bowl, combine the flour, cocoa, baking soda, baking powder, salt and espresso powder. Whisk until blended and set aside.
In the bowl of a stand mixer, combine the eggs, sugar and vanilla. Beat on high for 3 minutes or until creamy and lighter in color. Add the mayonnaise and blend on low speed until incorporated. Add about ¼ of the flour mixture and blend just until incorporated. Add ⅓ of the water and blend again on low. Repeat adding about ⅓ of the remaining flour, then half the remaining water. Start and end with the flour mixture divided into 4 additions, and the water in 3 additions. Scrape the sides and the bottom using a rubber spatula. Beat on low for another 30 seconds.
Fill the muffin liners to a little more than ¾ full. Bake in a preheated 350°F oven for 15 minutes or until a toothpick comes out clean. Cool in the pans for 5 minutes then remove to a rack to cool completely. Frost as desired.
To make the buttercream frosting:
Add the butter and cream cheese to a medium mixing bowl. Beat on medium-high until light and fluffy.
With the mixer on low, add the vanilla extract, 1 tablespoon of the milk, and the salt. Beat another minute on low to combine. Add the powdered sugar, 1 cup at a time, beating well after each addition. Scrape down the sides and bottom of the bowl and beat on medium-high for about 3 minutes or until the frosting is light and fluffy. Adjust by adding the remaining milk if needed, for desired consistency.
If not using immediately, refrigerate and rewhip before using.
To tint, remove half the frosting to a small bowl and add gel food color if using. Pipe on cupcakes as desired. Repeat with the plain buttercream in a clean piping bag. I used a Wilton 2A large round tip to frost the cupcakes.
Notes
This recipe has only been tested with Hellmann's Real Mayonnaise and was adapted from a recipe on their website.
This cake may also be baked in a 9-inch x 9-inch square baking pan. Grease and flour the pan and watch the baking time.
Nutrition information is calculated using an ingredient database and should be considered an estimate. When multiple ingredient alternatives are given, the first listed is calculated for nutrition. Garnishes and optional ingredients are not included.