WIP feat(bootstrap): initial working code

This is an initial version of the bootstrap code that seems to work under
the normal circumstances. I need to mock out a server that will test out
all of the error cases now.