STM32F103 custom HID bootloader

Hello,

I'm not new to Arduino and coding in general, but I'm having a hard time finding a way to achieve what I need:

I need custom HID bootloader for STM32F103, I'm making a product where product driver software should be able to update firmware on STM32 chip.
I think bootloader should work like this: on startup bootloader reads internal or external memory bit with "firmware update fuse", if it's active bootloader updates firmware via USB serial and resets "firmware update fuse" and resets MCU, if "firmware update fuse" is not active bootloader starts firmware.

I know that there are few bootloaders already, but I need my own version, if there is someone that can code one – I will pay for it. I most likely have to hire someone cos there are very little information on how to do it myself (if anyone knows good learning material on this topic, please share it).
I also want to learn concept of HID (composite), it's a mystery at the moment.

Cheers

It's for AVRs but will give you some guidance I think.

3Dgeo:
. . . bootloader updates firmware via USB serial and resets "firmware update fuse" and resets MCU, if "firmware update fuse" is not active bootloader starts firmware.

What is providing the "firmware via USB"? Normal operation is that something on the USB is driving the update, so I'm not seeing the utility of having the microcontroller initiate the update if there has to be something on the USB anyway.

MrMark:
What is providing the "firmware via USB"?

There will be dedicated software for that.