Fruit flies are an unfortunate seasonal issue. Try emptying your kitchen container frequently, washing it out regularly, and making sure the lid is secure and has a charcoal air filter to let the container 'breathe' while keeping smells inside. When emptying your kitchen container, twist and tie off the compostable liner bags to keep any fruit flies inside the bags.
Containers with rinseable and replaceable charcoal filters can help manage odor. Another tip is to keep compostable materials in the refrigerator or freezer.