Load A Module's View in popup

Hello, I have a attachments module in my Yii2 application. I am using controller and models to upload file and on client side I am using Jquery File Input Plugin by kartik. I want to engineer my code in a better way because attachments are a standalone component of my application which are associated with users, contacts etc. I am trying to use modules for the purpose and building a separate module for attachments. Question is am I doing it right?