Place oven racks in the upper third and lower third slots. Preheat oven to 350ºF (175ºC). Line 2 baking sheets with parchment paper.
Using a hand mixer, cream butter and sugar together at medium speed until butter is fluffy, about 2 minutes.
Add the egg and vanilla and beat for another minute.
In a separate bowl, mix almond flour, cocoa, coconut, baking powder, and salt. Pour into bowl with wet ingredients and mix until just incorporated. Fold in chopped chocolate.
Using a cookie scoop or a measuring spoon, scoop cookie batter onto baking sheet, leaving about 2 inches between cookies. If you're using a measuring spoon, scoop our about 1 1/2 tablespoons of batter.
Bake cookies for 11 to 12 minutes. Try not to overcook them--they stay softer if you don't cook them as much. Sprinkle flaked sea salt on top, if desired. Let cookies cool for 5 minutes before transferring to wire rack to cool completely. Store in an airtight container at room temperature for up to a week.