Did you think StaticResource were a save place to store data, as long as you not expose the name? This article shares how each StaticResource is publicly accessible for each Site and/or Community visitor.
Enterprise Design Pattern (fflib)
What is the Enterprise Design Pattern; why would you apply it; where and how to start? Implementing this pattern will help you structure your code base, promote reuse of methods and allow to reduce unit test runtime thanks to Mocking.