Meet the RaspiTrap: a smart mouse trap that relies on a Raspberry Pi computer to alert you when you have caught something. In fact, it provides video, photo, and text functionality. As you can see in the below video, you can view a photo of the caught mouse on your phone or a notification on your smartwatch.
The developer built an infrared barrier to detect when a mouse is inside. You will need to know a bit about Python if you plan to improve upon this. The good news is more information about the project has been made available on Instructables.