Begin by gathering all your ingredients. Preheat your oven to 350°F (175°C). Heat-treat the all-purpose flour by baking it on a baking sheet for 5 minutes.
In a large mixing bowl, combine the coconut oil, chopped chocolate, and sugar. Melt them together until smooth and allow to cool slightly before adding in the eggs, one at a time.
In another bowl, whisk together the cocoa powder, cornstarch, and heat-treated flour. Gradually add this dry mixture to the wet ingredients, mixing until just combined.
Divide the batter evenly between the prepared baking pans. Bake for about 25-30 minutes or until a toothpick inserted comes out clean. Let the cakes cool in the pans for 10 minutes.
In a large mixing bowl, beat together the butter, light brown sugar, granulated sugar, and vanilla extract until creamy. Gradually add in the flour and mix until combined. Adjust with milk if too thick.
Once the cake layers are cooled, place one layer on a serving plate. Spread cookie dough frosting on top, then place the second layer on top and frost the entire cake.
Decorate with chocolate frosting and sprinkle chocolate chips or cookie crumbs on top.
Allow the cake to sit for about 30 minutes to set, then slice and serve.