added code generator for frontend