Preheat the oven to 350 F and line a 12 cup muffin pan with paper liners.
In a large bowl, whisk together the flour, cocoa powder, sugar, baking soda, baking powder and salt.
Add the buttermilk, vegetable oil and vanilla and whisk until just combined. Pour in the hot coffee and whisk until the batter is smooth and glossy. It will be thin.
Fill each liner two thirds full and bake for 18 to 20 minutes until the tops spring back when lightly touched and a toothpick comes out clean.
Cool in the pan for 5 minutes, then transfer to a wire rack and cool completely.
Beat the softened butter for 2 minutes until creamy. Sift in the powdered sugar and cocoa powder, add the heavy cream, vanilla and salt, and beat on high for 3 minutes until fluffy and spreadable.
Pipe or spread the frosting generously onto the cooled cupcakes and finish with chocolate shavings or sprinkles if desired.