Prep your pan and oven. Line a 12-cup muffin pan with paper liners.
Heat the oven to 350°F (175°C). Lightly mist the liners if you want extra insurance against sticking.
Whisk the dry ingredients. In a large bowl, whisk flour, granulated sugar, brown sugar, baking powder, baking soda, salt, cinnamon, and nutmeg until no lumps remain.
Mix the wet ingredients. In a separate bowl, whisk oil, eggs, and vanilla until smooth. Stir in applesauce or drained pineapple if using.
Combine gently. Pour the wet mixture into the dry.
Stir with a spatula just until you no longer see dry flour. Do not overmix.
Fold in carrots and mix-ins. Add grated carrots and any optional nuts or raisins. Fold until evenly distributed.
The batter will be thick—this is good for a tender crumb.
Fill the liners. Divide batter evenly among the cups, about 3/4 full. Use a scoop for cleaner portions and even baking.
Bake. Bake 18–22 minutes, until the tops spring back when lightly pressed and a toothpick comes out with a few moist crumbs.
Cool completely. Let cupcakes sit in the pan 5 minutes, then transfer to a rack to cool. Frosting melts on warm cupcakes, so wait until they’re fully cool.
Make the frosting. Beat cream cheese and butter together until very smooth and fluffy, 2–3 minutes. Add vanilla and salt.
Gradually beat in powdered sugar until creamy and pipeable. Adjust sweetness to taste.
Frost and finish. Swirl or pipe frosting onto cooled cupcakes. Top with a sprinkle of chopped nuts or a dusting of cinnamon if you like.