Prep the pan and oven. Heat the oven to 350°F (175°C).
Line an 8-inch square baking pan with parchment, leaving some overhang for easy lifting. Lightly grease the parchment.
Mix dry ingredients. In a large bowl, combine the oats, almond flour, cinnamon, nutmeg, baking powder, and salt. Stir to evenly distribute the spices and leavening.
Whisk wet ingredients. In a separate bowl or large measuring cup, whisk together the applesauce, egg (or flax egg), maple syrup, melted coconut oil, and vanilla until smooth.
Combine. Pour the wet mixture into the dry ingredients.
Stir until the oats are evenly moistened and the batter looks uniform.
Add apple and mix-ins. Fold in the grated apple and, if using, the nuts and dried fruit. The batter will be thick—this is right.
Fill the pan. Scrape the batter into the lined pan and spread it into an even layer, pressing gently into the corners. Smooth the top with a spatula.
Bake. Bake for 28–34 minutes, or until the top is set and lightly golden around the edges.
A toothpick inserted in the center should come out mostly clean.
Cool completely. Let the pan cool on a rack for at least 30 minutes. Lift the slab out using the parchment and cool another 15–20 minutes before slicing into bars or squares.
Slice and store. Cut into 9 large squares or 12 smaller bars. Store as directed below.