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 an inch apart.
Process powdered sugar, almond flour and cocoa 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 fitted 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. 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 mixture slightly loosens 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.
To prepare buttercream, beat peanut butter and butter for a few minutes in a standing mixer with the paddle attachment on medium speed. Turn the mix one low speed, add powdered sugar and beat until the sugar incorporates with the butter. Go back on medium speed and beat the buttercream until it becomes light and fluffy.
To prepare ganache, microwave heavy cream until it’s hot. Pour the hot cream over the chocolate pieces in a bowl. Let it sit for a few minutes, then mix until chocolate is completely melted and smooth. Let cool.
Preheat oven to 325F. Bake the macarons for 8 to 10 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.
To assemble, spoon or pipe a teaspoon of ganache onto each of the upside-down cookies, followed by a teaspoon of peanut butter buttercream. Top with the remaining cookies.
To garnish, drizzling ganache on top of the each macaron, followed by a sprinkle of chopped peanuts.