Save JS rules in DB, generate function and args using data from frontend