I got so caught up with working on staratlas.exchange last night that I didn’t even think about writing until right after my head hit the pillow. I was just too exhausted to get back up, and I figured it was better for me to start writing in the mornings when I have the energy. So I’ll start prioritizing this in the AM now, before I hop on the computer and start working.

Younger is sick, she was complaining about a sore throat and headache, but I knew something was really wrong when she fell asleep before dinner; she never takes naps. We’re keeping her home from school today, but Missus is WFH Thursdays and Fridays now, so I won’t have to manage it all by myself.

Of course the big news that I want to talk about is the progress that I made with setting up the exchange. Two days ago we were able to get the front end to build in AWS Amplify, but the charts weren’t working. Yesterday I figured out that it was because the front end was behind TLS, but the data feed wasn’t and browsers won’t display mixed content. So we needed to figure out how to make it work behind a firewall. So I went with nginx’s Unit application.

I’ve never used it before and had to deal with a bunch of issues to make it work. I struggled to get it working on my dev box because of some mismatched Ubuntu sources, which cost me time. It’s controlled through pushing json config files through a pipe via curl, which is new to me. I also had to reconfigure node because v10 was still installed as the system default (I override it with nvm) and I had to suss out that the API calls were failing because of the older version. Anyways, I got it to work locally and then had it changed around on our cloud server pretty quickly.

Then I just need the cert, so I went with Let’s Encrypt and their certbot. I had setup issues. We’re using Route53 for DNS, and you’re supposed to be able to setup certbot to do the DNS validation so that things will auto-renew. I couldn’t get it to work and gave up and did it manually. Even that took longer than it should because I mistyped startatlas in the request and couldn’t figure out why the validation wasn’t working. So I got the cert and loaded it without too much trouble but the site was down. By this point it was getting late, and I had given up for the night when I realized that I had applied the cert to the listener on port 80. A small change and the API was secure, and the site was functional.

I also spent some time cleaning up the git repo. There’s a lot of, shall we say experimentation or troubleshooting in those commits, and I didn’t want our idiocy immortalized in the index. So I reset some branches, cherry picked some commits and got everything looking nice and tidy. I’m surprised it worked as well as it did. I actually deleted the dev branch from Github and sent it back up with the pruned version, and CI/CD did the rest. I have yet to do the same with origin/master. That’s a bit more risky than I wanted to deal with last night.

Earlier in the morning I had attempted to move our market indexer to Amplify, and spun up a micro Elasticache instance to replace our Redis database. I couldn’t get it to build though, which is something I need to do, since that should be cheaper to operate than our large EC2 instance. That’s one for the backlog.

So I’ve got a few more checks to do this morning, some cosmetic changes that we’ll need to do before we’re ready to get user feedback. Right now the site is just a vanilla Serum clone with a few changes, and we need to strip out a bunch of things and customize. I plan on really digging into the Serum code to figure out some bugs, and look through any other exchange implementations that I can find to figure out who else is having problems and what’s just us.