Preheat your oven to 350°F (175°C) and grease a 9-inch cake pan.
In a medium bowl, combine flour, baking powder, baking soda, cinnamon, and salt.
In a large bowl, cream butter and sugar until light and fluffy.
Add eggs one at a time, mixing well after each. Stir in vanilla.
Gradually add the dry ingredients, alternating with sour cream, until just combined.
Fold in the diced apples gently.
Pour batter into the prepared pan and spread evenly.
For the topping: Mix brown sugar, flour, cinnamon, and melted butter until crumbly.
Sprinkle the topping evenly over the batter.
Bake for 40-45 minutes, or until a toothpick comes out clean.
Cool in the pan for 10 minutes, then transfer to a wire rack.