Heat the oven to 350 F.
Line two large baking sheets with parchment paper.
Measure the flour, unsweetened cocoa, baking powder, baking soda, and 1/4 teaspoon of salt into a bowl. Whisk or stir to blend.
In a mixing bowl with an electric mixer, beat 4 tablespoons of butter with 1/2 cup of brown sugar until light. Add the egg and 1 teaspoon of vanilla; beat until well blended. Stir in the flour and cocoa mixture, alternating with the buttermilk and red food coloring. Beat until smooth and blended.
With a cookie scoop or pastry bag, drop or pipe the batter onto the prepared baking sheets in 1 1/2-inch round mounds.
Bake the whoopie pies for 8 to 10 minutes, or until the cakes spring back when touched lightly with a finger.
Cool completely before filling.
Prepare the filling (directions below) and spread or pipe some on the bottom of a cookie. Top with the another cookie to form a whoopie pie (flat side down). Repeat with the remaining cookies and filling.
Store the whoopie pies in the refrigerator in wax paper or parchment-lined containers, putting sheets of parchment or wax paper between the cookies.