Local setup and bug fixes

dimapetrov·

The code base starts taking shape now. My primary focus was to drastically increase test coverage in order to make future refactorings possible, the second goal was to modernize the infra and make maintenance tasks easier.

First of them was the local setup. Local setup is tricky in a way that it's not only about how to run the service, but also about data — posts, users, all of it is quite painful to build from scratch. With latest changes it became trivial — you can seed the data with one command, reset the database if needed and the local stack is set up as docker-compose with one command again.

Along the way the migration story was solved too. Now, to migrate prod database it's enough to run make tunnel in one tab and make migrate-prod in another one. Nice!

The tests look cool now too, the data is generated with fabrics, postgres test container gives isolation. While doing the changes claude has found a considerable number of silly bugs that got fixed with one blow.

Since it's that easy, I'll spend some more time polishing the codebase before I move on to new features