Preheat the oven to 350° and line your muffin tin with paper liners.
In a separate bowl whisk together the 1 3/4 cup gluten-free flour with 3 tsp baking powder, 1/2 tsp of salt, a 1/4 tsp of xanthan gum, and 1/4 cup cocoa powder. Set to the side.
In your Kitchenaid Mixer fitted with the paddle attachment, add in the 1 cup of room temperature salted butter as well as the 1 cup of brown sugar and mix until light and fluffy.
Next add in the 4 room temperature eggs one at a time, mixing in as you go. Once the eggs are fully mixed in, add in the shot of espresso, tsp of vanilla, and mix to combine.
Lastly, add in the flour mixture and mix thoroughly. You may have to scrape down the sides with a rubber spatula to make sure all the ingredients are fully incorporated.
Scoop equal portions of the cupcake batter into all 12 cupcake liners. Place the tin on the middle rack of the oven and bake for 25-35 minutes or until the cupcakes are fully risen and if you stick a toothpick in the center it comes out clean.
Remove the tin from the oven and carefully remove the cupcakes from the tin placing them on a cooling rack to cool. Do not frost them until they are fully cool.