prototype:
    1. apis to mirror saved in endpoints.json
    2. auto login if necessary
    3. save json, save code
use partial class so that I can hardcode some fix