Added database initialization and master layouts for both frontend and Backend