1. Preheat oven to 350°F (175°C).
2. For the cookie batter: In the bowl of your mixer, beat together the oil and sugar. Add the eggs. With a spoon, gently mix in ground almonds, potato starch, and salt. Add the chopped pecans and chocolate chips and mix well.
3. For the cake: In the bowl of your mixer, beat eggs, oil, sugars, and vanilla. Add cocoa, coffee, and potato starch. In a small bowl, mix baking soda and vinegar, and then mix with the batter.
4. Pour chocolate cake batter into a nine- by 13-inch (20×30-centimeter) baking pan. Then add the cookie dough, in tablespoon-sized drops, over the top of the chocolate cake. (It should look polka dotted.) Bake for 45 minutes.
5. If desired, make the frosting by mixing all ingredients together. Pour over cooled cake.