Coming from Node.js/Express background, I see that plug is basically an equivalent to middleware in Phoenix framework. After reading about Controllers
plug
Controllers