chore: Create view file and update automation

- improve all view logic into view.js
- improve automation