Preheat the oven to 170°C/225°F/Gas Mark 3. Prepare 12 hole muffin tray with muffin cases.
In a large bowl mix together flour, sugar, baking powder, baking soda, cocoa powder, xanthan gum, and salt.
In a separate bowl combine the eggs, milk, melted butter, and hot water. Mix well.
Add the wet ingredients into the larger bowl that contains the dry ingredient mix and whisk until fully combined and resembles a smooth chocolate cake batter.
Divide between the 12 muffin cases filling to around half way. Depending on the size of your muffin cases you might have a little leftover mixture you can use for more cupcakes.
Place in the oven and bake for approximately 20-25 minutes. Insert a skewer into a cake. If it comes out clean its ready if not leave it in slightly longer. (Times may vary slightly dependent on oven).
Transfer to a cooling rack and leave to cool and make the frosting.