Here's the public repository for bluey:
Bluey can be programmed using the built-in bootloader, or using an external programmer. The latter can be done with something like the Nordic nRF52-DK which is a bit pricey. Another great option is to use the Black Magic Probe firmware on a cheap STM32F103 breakout. Once this is done, you can both upload code and debug using GDB. I've covered details for this approach in the bluey github repo.