July 4th Flag Cake

Ingredients:
1 cup boiling water
3/4 cup natural unsweetened cocoa powder
1 tablespoon instant coffee granules
1/2 cup whole milk
1 1/2 teaspoons pure vanilla extract
2 cups all-purpose flour, plus additional flour for dusting pan
1 1/4 teaspoons baking soda
1/2 teaspoon salt
2 sticks (1/2 pound) unsalted butter, softened, plus additional butter for greasing pan
1 cup packed light brown sugar
1 cup sugar
4 large eggs
2 (8-ounce) packages cream cheese, at room temperature
2 sticks (1/2 pound) unsalted butter, at room temperature
1 1/2 teaspoons pure vanilla extract
"1 1/2 cups confectioners sugar, sifted", 1 1/2 pints raspberries (about 3 cups total)
1/2 pint blueberries (about 1 cup total)
Equipment: 13- by 9-inch metal baking pan
stand mixer fitted with the paddle attachment
pastry bag
star-shaped pastry tip (such as Wilton #2110)

Instructions:
Position a rack in the middle of the oven and preheat to 350°F.
Butter the bottom and sides of a 13- by 9-inch metal baking pan and line the bottom with wax or parchment paper. Butter the paper and dust the pan with flour, knocking out any excess.
In a medium bowl, whisk together the boiling water, cocoa powder, and instant coffee granules until smooth. Whisk in the milk and vanilla.
In a second medium bowl, sift together the flour, baking soda, and salt.
In the bowl of a stand mixer fitted with the paddle attachment, combine the butter with both sugars and beat on medium until light and fluffy, about 3 minutes. Add the eggs, one at a time, and beat on medium until fully incorporated. Reduce the speed to low and add the flour and cocoa powder mixtures in batches, beginning and ending with the flour mixture. (The batter may look curdled.) Pour the batter into the prepared pan, smoothing the top, and bake the cake until a wooden toothpick inserted in the center comes out clean and the cake begins to pull away from the sides of the pan, 35 to 40 minutes. Let the cake cool in the pan on a rack for 10 minutes, then invert the cake onto the rack, remove the wax or parchment paper, and let it cool completely. DO AHEAD: The unfrosted cake, can be cooled, wrapped securely in plastic wrap, and stored at room temperature up to 24 hours, before assembling and serving.
In the bowl of a stand mixer fitted with the paddle attachment, combine the cream cheese and butter and beat until creamy and smooth, 3 to 5 minutes. Beat in the vanilla extract. With the mixer on low, add the sifted confectioners' sugar in three batches, mixing until fully incorporated. Increase the speed to medium-high and beat until the frosting is smooth. Chill the frosting in the refrigerator for 30 minutes before assembling the cake.
Frost the top and sides of the cake with 2 1/2 cups of the frosting. Transfer the remaining frosting to a pastry bag fitted with the star tip.
Using a toothpick or small knife, outline a 4 1/2-inch-long by 3 1/2-inch-wide rectangle in the top left corner of the cake. This area will be reserved for blueberries.
Starting with the longer side of the cake that is closest to you, pipe a line of frosting along the top edge of the cake then arrange two horizontal rows of raspberries directly above the line of frosting. Pipe a second line of frosting above the raspberries and arrange two more horizontal rows of raspberries directly above the frosting. Repeat this process two more times, making sure to exclude the top left corner that is reserved for the blueberries. Arrange the blueberries in horizontal rows in the top left corner of the cake.
Slice and serve the cake immediately or store it, covered securely in plastic wrap, in the refrigerator until ready to serve.