As
@MossRoad mentioned Water Cop has been doing it for close to 20yrs. These systems incorporate a controlled ball valve that is usually installed on the main incoming water line.
Some of their systems will include the main water valve, controller, probe sensor, then you can add additional supervised wireless sensors or hardwired sensors to monitor multiple areas (hot water heater, well tank, washing machine, etc). When the a system senor detect water it relays to the controller which turn the main water ball valve off.
This is also designed to tie into a home security / monitoring system or home automation controller for remote notification. The link again: Water Cop:
NEW HOME 2019 - Watercop
Another company is Fortrezz (they have a remote app):
FortrezZ
There are a bunch of others out there also but these are two of the ones we have used on clients homes...
For some of our clients the ball valve part of the system is imperative (i.e. city water supply, or gravity positive systems), as is turning the power off to the well pump, so we have some clients we install both a valve & a power shut-off for...