Preheat the oven to 350℉/180℃ and grease and parchment line an 8-inch cake pan. Then, shred the carrots on a box grater to whatever thickness you'd prefer.
Whisk together the flour, baking powder, baking soda, salt, cinnamon, nutmeg, ginger, and allspice.
1½ cups all-purpose flour, 1 teaspoon baking powder, ½ teaspoon baking soda, ¼ teaspoon kosher salt, 1 teaspoon ground cinnamon, ⅛ teaspoon ground nutmeg, ⅛ teaspoon ground ginger, ⅛ teaspoon ground allspice
In a stand mixer (or using a hand mixer), beat together the eggs, vegetable oil, citrus juice, sugar, and vanilla on medium speed for about 2 minutes.
2 large eggs, ½ cup vegetable oil, ¼ cup orange juice, 1 cup granulated sugar, 1 teaspoon vanilla paste or extract
With the mixer on low speed, spoon in the flour mixture until it’s just about incorporated. Scrape down the sides, then fold in the carrots, shredded coconut and walnuts (if using) by hand until evenly disbursed.
1½ cups shredded carrots, ⅓ cup sweetened shredded coconut, ½ cup chopped walnuts
Add the batter to the prepared cake pan and smooth over. Bake in the center rack for 25-35 minutes until the edges have just pulled away from the sides and the center springs back when touched. A toothpick inserted into the center will come out with moist crumbs.
Place on a wire rack to cool for 10 minutes, then remove the cake from the pan and finish cooling on the wire rack.