To prepare macarons, line two large baking sheets with parchment paper. Put a master template under the parchment paper or draw about 12 1 1/2-inch circles in rows on the paper, about 1 inch apart.
Process powdered sugar, almond flour and espresso powder in a food processor until finely ground. Sift the mixture through a sieve. If there are more than 2 tablespoons of large chunks left in the sieve, grind them and sift again. Set the mixture aside.
In the bowl of a stand mixer fitter with a whisk attachment, beat egg whites at medium speed until frothy. Reduce the speed to low and gradually add the granulated sugar, 1 tablespoon at a time. Add vanilla. Increase the speed to high and beat until very stiff peaks form, about 5 minutes.
Sift the almond flour mixture over the egg whites. Using a rubber spatula, gently fold the almond flour mixture into the egg whites until the ingredients are just combined. Continue to fold the mixture until it has loosened and falls in a ribbon from the spatula.
Fit a pastry bag with a 1/2-inch round tip and fill the bag with the batter. Using the template as a guide, pipe circles onto the parchment papers.
Tap the bottom of each sheet on the work surface to release trapped air bubbles. Let the cookies stand at room temperature for at least 30 minutes. This allows the cookies to develop their crusts.
Preheat oven to 325F. Bake the macarons for 10 to 12 minutes, until set but not browned.
Transfer the baking sheets to wire racks and let the macarons to cool completely on the pans. Once cooled, gently lift half of the cookies from the parchment paper and turn them upside down.
Spoon or pipe a teaspoon of ganache onto each of the upside-down cookies. Top with the remaining cookies.
To prepare the cake, preheat oven to 350F. Grease three 5-inch cake pan, and line bottoms with parchment paper.
In a standing mixer with a paddle attachment, mix butter and sugar until light and fluffy. Add eggs, one at a time, beating well after each addition. Mix in sour cream, oil and vanilla.
In a separate bowl, mix flour, espresso powder, baking powder, baking soda and salt. With the mixer on low speed, add the flour mixture and mix until just blended.
Stir in espresso or coffee until smooth.
Pour the cake batter evenly between cake pans, and bake for 35 to 40 minutes, or until a toothpick inserted into the cake comes out clean. Let cool completely.
To prepare buttercream frosting, place butter and powdered sugar in a mixing bowl. Beat until pale and fluffy, about 5 minutes. Add espresso and continue beating until well combined.
To assemble the cake, simply sandwich cake layers with the espresso buttercream. Top the cake with another thin layer of buttercream. Garnish with 6 macarons. Sprinkle cocoa powder or espresso powder on top.
Cover and refrigerate the cake. Leave cake in room temperature for at least an hour before serving.