upload main app codes