How to generate barcode automaticly whene i add item?

No, I just need to generate the barcode automatically.
Please look at this video I found it, it’s awesome solution but I don’t know how can I make it

Best regards