Preheat your oven to 350°F (175°C). Grease and flour a 9x13-inch baking pan or two 9-inch round cake pans.
In a medium bowl, whisk together the flour, baking soda, baking powder, cinnamon, nutmeg, and salt.
In a large bowl, beat the eggs, granulated sugar, and brown sugar until well combined. Add the oil and vanilla extract, and mix until smooth.
Gradually add the dry ingredients to the wet ingredients, mixing until just combined.
Fold in the grated carrots, crushed pineapple, and any optional ingredients like walnuts or coconut.
Pour the batter into the prepared pan(s). Bake for 40-45 minutes, or until a toothpick inserted into the center comes out clean.
Let the cake cool completely in the pan(s) on a wire rack before frosting or serving.