fix preview encoding
created api class
added simple web app