Preheat the oven to 350 degrees Fahrenheit (175 degrees Celsius), lightly spray a 9x13 inch pan with baking spray or lightly butter and flour the pan, and set aside.
In a medium-sized mixing bowl, whisk together the flour, baking powder, baking soda, and salt, and set aside.
In the bowl of a stand mixer or a large mixing bowl with a hand mixer, add butter. With mixing speed on medium, beat for 2 minutes until creamy. Add sugar and beat on medium speed for two minutes or until light and fluffy.
Add vanilla extract and coconut extract, and mix to combine.
Add egg yolks, one at a time, mixing well after each addition.
In a medium mixing bowl, whip egg whites until stiff peaks form, and set aside.
Gradually add dry ingredients to the wet ingredients, alternating adding the coconut milk and sour cream, mix just until combined.
Gently fold in egg whites until no streaks remain.
Pour batter into prepared baking pan and spread into an even layer.
Place in the oven to bake for 30-45 minutes or until the top springs back when touched.
Remove from the oven and allow to cool for 30 minutes before frosting.
For the Frosting
In the bowl of a stand mixer or a large mixing bowl with a hand mixer, beat butter on medium speed for 2 minutes or until creamy.
With mixing speed on low, gradually add the powdered sugar then add vanilla extract, coconut extract, coconut milk, and salt. Beat on medium-high speed for 3 minutes. Using an offset spatula or a knife, spread onto the cooled cake in an even layer. Top with coconut flakes.
Notes
To STORE the Coconut Cake with Coconut Frosting, cover it tightly and keep it at room temperature for up to 3 days or refrigerate for up to a week. To FREEZE, wrap it well in plastic wrap and foil. You can freeze the cake for up to 3 monthsTo REHEAT, let the cake thaw if frozen, then warm slices in the microwave for 10-15 seconds.