An ecosystem requires both biotic and abiotic factors to be complete and self-sustaining. The biotic components are living things, while the abiotic components are the non-living parts of the ecosystem.
The most important biotic component would be producers. In a terrestrial ecosystem, these would be plants, which capture sunlight and use it to convert carbon dioxide and water into organic molecules. Producers are usually eaten and kept in balance by primary consumers, also called herbivores. Waste materials are recycled in the ecosystem by detritivores.
The most important abiotic factor in terrestrial ecosystems is sunlight. Sunlight provides the energy input that drives the whole ecosystem. A second abiotic factor is the bedrock geology of the area, which creates the topsoil; if the soil is rich or lacking in minerals, this could greatly affect what plants can grow in an area. A third important abiotic factor is the availability of water, either as groundwater or precipitation.