Brew about 1-3/4 cups of coffee (regular or decaffeinated)—enough (with a little extra) for both the cake and icing. Cool to room temperature. Coffee can be prepared up to 1 day in advance and refrigerated.
Make cake:
Heat the oven to 350°F with a rack in the middle position. Mist the bottom of an 8-inch square glass baking dish or metal baking pan with cooking spray. Line with a square of parchment paper (see Notes). Mist the sides of the glass baking pan. Set aside.
In a large bowl, whisk together the flour, cocoa, brown sugar, baking soda and salt, breaking up any lumps of cocoa and sugar.
Make a well in the center and to it add the coffee, oil, vinegar and vanilla (and coffee extract, if using). Whisk the wet ingredients to combine, then whisk them into the dry ingredients just until evenly moistened. The batter will be fluid. (Don’t overmix the batter, which will develop gluten and cause the cake to have a firmer, tougher texture. It also won’t rise properly.)
Pour the batter into the prepared baking dish. Bake until a toothpick inserted at the center of the cake comes out clean, 50 to 55 minutes.
Cool completely in the pan on a wire rack.
Make icing:
When the cake has cooled, make the icing.
In a large bowl, whisk the sugar and cocoa until no lumps remain.
Add 3 tablespoons coffee, vanilla and oil. Whisk until smooth.
The icing should be thick but spreadable, with a consistency similar to pourable yogurt. If it is too stiff, whisk in additional coffee 1 teaspoon at a time until the proper consistency is achieved.
Pour the icing onto the center of the cake in the pan, then spread evenly.
Let stand at least 30 minutes before cutting and serving.
Notes
You can use either Dutch-processed cocoa or natural cocoa works, just be sure it is unsweetened.
For the batter, I used refined coconut oil which lends a neutral taste and avoids seed oils. You can also use the same amount of vegetable or canola oil. If using coconut oil, measure 1 cup of coconut oil in a dry measuring cup (like one used to measure flour) or 225 grams if using a scale. Transfer it to a glass measuring cup or bowl. Microwave on high in 15 second intervals until just melted, stirring occasionally. Let cool slightly before mixing it into your batter.
For the batter, if you have coffee extract, use 2 teaspoons vanilla extract and 1 teaspoon coffee extract to replace the 1 tablespoon of vanilla extract (1 tablespoon = 3 teaspoons).
For the frosting, I used olive oil since it’s such a small amount.
If you want to remove the cake from the baking pan before icing it, I recommend putting a piece of parchment paper on the bottom of the pan. Cut around the sides and release onto a plate and invert it onto another plate. Then pour the icing on top. Once the icing is on the cake in the baking pan, you will not be able to remove the full cake. This is the kind of cake that’s fine to leave in the baking pan for serving.