How can you limit quantity per product?

Fam, I am curious, how can I limit the quantity per product? for example I want the customer to not be able to add more than one quantity per product. I also would not like to use a third party tool to achieve that. Any help would be appreciated. Thanks.