Cupcakes:
Preheat Oven and Prep Tin
Preheat the oven to 350°F (175°C) and line a 12-cup muffin tin with cupcake liners.
Combine Dry Ingredients
In a large mixing bowl, sift together the flour, cocoa powder, sugar, baking powder, baking soda, and salt.
Add Wet Ingredients
Add the egg, milk, oil, and vanilla extract to the dry ingredients. Beat until smooth and well combined, about 2 minutes.
Add Hot Liquid
Gradually add the boiling water or hot coffee, mixing until the batter is smooth. The batter will be thin—this is normal and makes for moist cupcakes.
Bake
Pour the batter evenly into the cupcake liners, filling each about two-thirds full. Bake for 18-20 minutes, or until a toothpick inserted into the center comes out clean. Remove from oven and let cupcakes cool completely on a wire rack before frosting.
Frosting:
Cream the Butter
In a large bowl, beat the softened butter until smooth and creamy, about 2 minutes.
Add Dry Ingredients
Gradually add the powdered sugar and cocoa powder, beating on low speed until combined.
Add Liquid Ingredients
Add the heavy cream, vanilla extract, and a pinch of salt. Increase to high speed and beat until the frosting is light, fluffy, and holds its shape, about 3 minutes.
Frost the Cupcakes
Use a piping bag or a spatula to frost each cupcake. Add sprinkles or chocolate shavings if desired.