Melt Chocolate and Butter: In a saucepan over medium heat, melt the chocolate and butter together, stirring constantly until smooth. Remove from the heat.
Whisk Wet Ingredients: In a separate bowl, whisk together the eggs, sugar, and vanilla extract until the mixture is light and creamy.
Combine Wet and Melted: Gradually pour the egg mixture into the melted chocolate mixture, whisking gently until well combined and smooth.
Sift Dry Ingredients: In another bowl, sift together the flour, baking powder, baking soda, and salt. Sifting helps prevent lumps for a smoother batter.
Combine Wet and Dry: Gradually add the sifted dry ingredients to the chocolate mixture, mixing until just combined. Avoid overmixing.
Add Coffee: Pour in the coffee and stir until the batter is smooth and uniform.
Prepare Pans and Bake: Pour the batter evenly into two greased 8-inch cake pans. Bake for 25 to 30 minutes, or until a toothpick inserted into the center comes out clean.
Cool Cakes: Let the cakes cool in the pans for a few minutes before inverting them onto a wire rack to cool completely.