Start by heating your oven to 350°F (175°C). Prepare your baking pan by greasing it and dusting with flour, or just line it with parchment paper.
In a medium bowl, sift together the flour, baking powder, baking soda, salt, cinnamon, and nutmeg. Set this mix aside.
In a bigger bowl, beat the sugar and eggs until the mixture becomes smooth and creamy. Then add the oil and vanilla extract and mix well.
Add the dry ingredients little by little into the wet ingredients, stirring gently just until everything is combined. Avoid overmixing.
Next, gently fold in the grated carrots, shredded coconut, and any nuts or raisins you want to use. Take care not to stir too much.
Pour the batter into your prepared pan. Bake it in the oven for 40 to 45 minutes. To check if it’s ready, stick a toothpick in the middle if it comes out clean, the cake is done.
Let the cake cool for about 15 minutes in the pan, then move it onto a wire rack to cool completely.
While the cake cools, mix softened cream cheese and butter until smooth. Gradually add powdered sugar and vanilla, beating until you get a creamy frosting.
Once the cake is cool, spread the frosting evenly over the top. Finish by sprinkling toasted shredded coconut on the frosting for a little crunch and extra flavor.