Step 1: Prepare the Baking Pan : Preheat oven to 350°F (175°C). Grease and line a 9x13-inch pan or two 8-inch round pans with parchment paper.
Step 2: Mix Dry Ingredients : In a large bowl, whisk together flour, baking powder, baking soda, salt, cinnamon, and nutmeg.
Step 3: Mix Wet Ingredients : In another bowl, beat together oil, granulated sugar, brown sugar, and eggs until smooth and well blended. Stir in vanilla extract.
Step 4: Combine Wet and Dry Mixtures : Gradually add the dry ingredients into the wet mixture, stirring until just combined (don’t overmix).
Step 5: Add Carrots and Extras : Fold in grated carrots, and if desired, pineapple and nuts for extra flavor and texture.
Step 6: Bake the Cake : Pour batter into the prepared pan. Bake for 40–45 minutes or until a toothpick inserted in the center comes out clean. Allow to cool completely on a wire rack before frosting.
Step 7: Make the Cream Cheese Frosting : Beat cream cheese and butter together until smooth and creamy. Gradually add powdered sugar, then mix in vanilla and a pinch of salt until fluffy.
Step 8: Frost and Serve : Spread frosting evenly over the cooled cake. Optionally sprinkle with chopped nuts or coconut flakes for garnish.