Greetings. For example, I need to access the database in the application, which means that I need to somehow receive and store the login, password for the database; You need to access the API vk and store tokens for this. Also, the application should be able to change these tokens / passwords. To write these passwords directly in the code is also not the best option.
How to do it correctly in terms of architecture? Of course, you can just store everything in some json file, but is it correct to do this? Maybe you should write a static class AccountsManager , which will manage all these matters?