Documentarion of project structure and factoring

Documentarion of project structure and factoring the app.js