01 - Preheat oven to 350°F. Line a standard 12-cup muffin pan with paper cupcake liners.
02 - In a medium mixing bowl, whisk together all-purpose flour, baking powder, baking soda, salt, cinnamon, nutmeg, and ginger until fully blended.
03 - In a large bowl, beat eggs, granulated sugar, vegetable oil, applesauce, and vanilla extract until the mixture is smooth and slightly thickened.
04 - Gradually add dry ingredients to the wet mixture, folding gently with a spatula until just combined. Do not overmix to maintain tenderness.
05 - Fold in finely grated carrots and chopped walnuts or pecans, if using, until distributed evenly throughout the batter.
06 - Divide batter equally among cupcake liners, filling each about three-quarters full. Bake for 20 to 22 minutes, or until a toothpick inserted in the center emerges clean.
07 - Allow cupcakes to cool in the pan for 5 minutes before transferring them to a wire rack to cool completely.
08 - In a clean mixing bowl, beat softened butter and cream cheese until creamy and fully combined. Gradually add sifted powdered sugar, vanilla extract, and a pinch of salt, beating until the frosting becomes light and fluffy.
09 - Once cupcakes are completely cool, generously spread or pipe cream cheese frosting on top of each cupcake before serving.