Preheat oven to 350 F. In a large bowl add the eggs, sugar, brown sugar, melted coconut oil, and vanilla extract. Mix well with an electric mixer, stand mixer, or stiff whisk until the sugar is dissolved.
Pour in the milk and apple cider vinegar and mix well to distribute into the batter.
Add the gluten free flour, cocoa powder, baking powder, and baking soda to the bowl and gently fold into the batter with a rubber spatula until the flour is just incorporated. Be careful not to over mix!
Place cupcake liners in a cupcake tin. Use a cookie scoop or spoon to fill the liners up about ¾ of the way full. Tap the cupcake pan on the counter a few times to release any air bubbles. Bake in the oven for 15 - 17 minutes until the cupcakes are perfectly domed on top and you can insert a toothpick into the center of a cupcake and it comes out clean.
Let the cupcakes cool slightly in the pan before transferring them to a cooling rack to cool completely. This will prevent wet and soggy cupcakes.
Once the cupcakes have cooled down, prepare the icing by creaming the cream cheese and butter together in a mixing bowl with a mixer. Do this for at least 5 minutes until the cream cheese and butter are creamy and no clumps of cream cheese are left.
Add the powdered sugar to the bowl in ½ cup increments and continue mixing. Once half of the powdered sugar has been added, add the cocoa powder, vanilla extract, and 1 tablespoon of milk. Continue to mix and add the remaining powdered sugar in ½ cup increments until you reach your desired consistency.
Fill a piping bag fitted with a tip with the frosting. Start in the middle of each cupcake and pipe a large swirl on top of each cupcake. Top with shaved chocolate if desired and enjoy!