Step 1: Prepare the cake batter
- Preheat your oven to 350°F (175°C). Grease and flour a 9×13-inch (23×33 cm) baking pan or two 8-inch round cake pans.
- In a medium bowl, whisk together the flour, baking powder, baking soda, cinnamon, nutmeg, and salt. Set aside.
- In a large bowl, beat the vegetable oil, applesauce, granulated sugar, and brown sugar until smooth.
- Add the eggs one at a time, beating well after each addition. Stir in the vanilla extract.
- Gradually mix the dry ingredients into the wet ingredients until just combined.
- Fold in the grated carrots, crushed pineapple, shredded coconut, and nuts (if using).
Step 2: Bake the cake
- Pour the batter evenly into the prepared pan(s).
- Bake for 40-45 minutes (for a 9×13-inch pan) or 30-35 minutes (for round pans), or until a toothpick inserted into the center comes out clean.
- Allow the cake to cool in the pan(s) for 10 minutes, then transfer to a wire rack to cool completely.
Step 3: Make the cream cheese frosting
- In a large bowl, beat the cream cheese and butter together until smooth and creamy.
- Gradually add the powdered sugar, 1 cup at a time, beating until well combined.
- Stir in the vanilla extract and add milk, 1 tablespoon at a time, if needed for a spreadable consistency.
Step 4: Frost and decorate the cake
- Spread the cream cheese frosting evenly over the cooled cake.
- Decorate with additional shredded coconut or chopped nuts, if desired.