implements local repo factory.