The aim is to have your forest garden as a ecosystem, so that it doesn’t rely on any external inputs for fertility, water or pest control.
Fertility is supplied by ‘system plants’, those plants which don’t have a direct harvest but contribute to the garden as a whole.
Different cropping plants have different fertility requirements. To calculate a nutrient budget, ie how many nutrient providing plants are required, see ‘Fertility in forest gardens’, chapter 6 Creating a Forest Garden by Martin Crawford.
The acidity/alkalinity (pH) of your soil will also have an effect on how readily nutrients are absorbed. I found the easiest and most cost-effective way to have nutrient levels and the pH tested was from my local farmers cooperative, about £5 per sample. It’s a reasonable price because they want to quite literally sell you a metric tonne of fertilisers!