divided the front end and back end

the api files can be found in the api directory. the public php files as
well as css/html/javascript/images can be found in the public directory