Preheat oven to 350º F. Line cupcake pan with paper liners.
In a large bowl, whisk together flour, sugar, cocoa powder, espresso powder, baking powder, baking soda, and salt.
1 ⅛ cup all-purpose flour, 1 cup granulated sugar, ⅜ cup cocoa powder, 1 teaspoon baking powder, 1 teaspoon espresso powder, ¾ teaspoon baking soda, ½ teaspoon fine sea salt
To the dry ingredients add milk, oil, sour cream, egg, and vanilla. Stir until well combined. The batter will be thick.
3 ounces whole milk, ¼ cup vegetable oil, 2 Tablespoons full-fat sour cream, 1 large egg, 1 teaspoons vanilla extract
Add hot coffee to the batter, carefully mixing with a whisk until well blended. The batter will become very thin.
½ cup hot coffee
Bake the cupcakes.
Pour the batter into the cupcake liners, filling each ⅔ full.
Bake the cupcakes for 18-20 minutes, or until the tops spring back when gently poked. Let cool completely.
Make the frosting.
Brew a cup of coffee. Combine 1 ½ Tablespoons of the hot coffee with the espresso powder and stir until the espresso powder is dissolved. Let cool to room temperature or chill.
1 ½ Tablespoons hot coffee, ¾ teaspoon espresso powder,
In the bowl of a stand mixer using the paddle attachment (or in a large bowl using an electric hand mixer), beat butter on medium-high speed until smooth.
¾ cup unsalted butter
Add vanilla and salt and beat on medium-high speed until blended.
1 ½ teaspoons vanilla extract, 1 pinch fine sea salt
Add sugar slowly – one cup at a time – beating well on medium speed and scraping the bowl often. When all sugar is added the frosting will be slightly dry.
3 cups confectioners' sugar
Add cooled coffee and beat on high speed until the frosting is light and fluffy.
Frost the cupcakes and garnish with a sprinkle of espresso powder and whole coffee beans, if desired.
Notes
Storage: Cupcakes can be stored at room temperature, sealed in an airtight container, for up to 3 days.Freezing: Unfrosted cupcakes can be frozen, sealed in an airtight container, for up to 2 months. Defrost cupcakes at room temperature before frosting and eating.If you'll be piping tall swirls of frosting onto the cupcakes, double the frosting.