add files API and move encoder into main server package