"Good compost" comes from the widest range of ingredients you can find, fruits, vegetables, mowed grasses, weeds, manure. Slow compost tends to be better than fast as it contains more microorganisms such as bacteria and fungi. These are what roots are looking for.
If rats are the main problem, you really need to get rid of them because they can harbor disease for humans and animals, get into car engines, or at least keep them minimized.
I like worm towers that are large PVC pipes or plastic pots drilled with holes and sunk into the ground. A heavy lid will keep out rodents. The bottom half of a 2 foot tower is drilled with holes big enough to let worms in. Layers of fresh kitchen scraps and manure are put directly into the buried towers and the worms come and go. They shouldn't contain onions or citrus peels. Put them about 10 feet apart and worms will come to them, you probably won't need to buy any worms.
http://gardendrum.com/2013/01/12/how-to-make-a-worm-tower/
http://www.redwormcomposting.com/gardening/worm-towers-2013/
everything grows well in compost. that's how Nature does it. Leaves drop off trees, wild animals like rabbits poop all over, the worms come up, and that's what we're trying to mimic.
As far as keeping things in and out, definitely rats because they chew plants to make nests, and they eat vegetables and fruit, along with all their other rodent friends. To avoid an overabundance of insects, collect all fallen fruit, don't let vegetables rot in place, bury it deeply, like a hugel trench so the worms will find it, too. If you have greater amounts than a worm tower can handle, hugel trenches are very good, and stay damp so the worms will come and stay.
Worms are your best tillers and fertilizers, so feed your worms that feed your soil.
Mediterranean climate, hugel trenches, fabulous clay soil high in nutrients, self-watering containers with hugel layers, keyhole composting with low hugel raised beds, thick Back to Eden Wood chips mulch (distinguished from Bark chips), using as many native plants as possible....all drought tolerant.