Preheat the oven to 320°F (160 °C). Grease the bottom of a rectangular baking dish, place parchment paper, also greased. Melt the chocolate gently in a water bath with the soft butter.
Separate the egg whites from the yolks and sift the flour with the baking powder. Whip the egg whites with a pinch of salt separately to snow. Beat the egg yolks and sugar until whitened, add the melted chocolate and continue stirring.
Gradually add the flour, baking powder and coconut flakes. Start adding the whites in portions while stirring thoroughly with a spatula. Pour the resulting mixture into the greased dish and smooth it out.
Put to bake at 320°F (160 °C) for 12-13 minutes and check for readiness with a toothpick. Remove the finished layer from the dish and cool it. Heat the milk almost to boiling point, remove it from the heat and add the crushed chocolate. After a minute, stir.
Beat the egg yolks in a deep bowl until whitened with the sugar, add the starch and cocoa. In a trickle, start pouring in the chocolate with the milk, stirring constantly, to prevent the yolks from curdling. Put the cream back on the stove and stir constantly for about 10 minutes, until thickened.
Remove from the heat and flavour it with the liqueur. Cover the cream well with foil to prevent it from forming a crust and let it cool completely. Bake the chopped nuts in a dry pan. Use a thread or knife to cut the layer into 2 separate layers. Bind them together with plenty of cream and pour on the remaining cream on top.