using bar-code scanner within website

I'm a backend developer who wants to put together some decent fullstack service for the community (entirely non-commercial): a shared library. User is supposed to scan a barcode on a book to save the book's info. I would really prefer to use the web and stay away from native apps for now (I don't have time to make it for different devices etc). Could I implement barcode scanner within a webpage? How would it look like? I haven't found any good examples.