You don't tell us how the Raspberry Pi is used. If you need to write data persistent to a storage, there is no way to have a software solution to avoid data lost on power interruption. Even such a software has no chance to do its work. You need a power fail battery buffer to keep power up for several seconds to gracefully shutdown the RasPi. You should find simple solutions for the Raspberry Pi on the web, keyword UPS.
If you don't need to store persistent data but only start always with the same predefined stable configuration you can use a read only filesystem that does not modify the operating system so you can start it without corruption after a power fail. In particular together with a union filesystem it is very comfortable by managing temporary data storage. One example you can find at How do I make the OS reset itself every time it boots up?.
Another solution is to tell your customers not to interrupt the power of the RasPi. Nowadays it is well known not to do it for computer. And yes, they will learn it very quick ;-)