When we built the van we bought a Waeco CR110 refrigerator, a specialist 12V compressor fridge made for boats and campers and costing 5-6 times that of a standard domestic model. Its had a few adventures over the years, the motorhome pages on this site detailing the fun we've had getting it to work efficiently, but it developed a fault of not switching the compressor motor off properly and instead, would switch off/on for ten or more minutes when it got close to temperature. The diagnosis was a faulty thermostat, but the replacement sent didn't fix the problem. It was nine years old and the next diagnosis was faulty controller, more replacement cost which I declined, though I could take it out and send it off for full examination. Fitting a basic switch showed that whatever the faulty component, a basic switch would turn the compressor off and on reliably so another solution was sought.
The fridge itself is an insulated box, with a door on the front, an inbuilt cooling element, a control panel and a sophisticated gas compressor known the world over as a Danfoss BD35F, almost standard for dozens of manufacturers, not just Waeco. This itself has a replaceable controller based on a microcontroller, which carries out the conversion of 12-24V DC into three-phase AC to drive the compressor motor, and carries out a variety of safety and performance checks to ensure the equipment works ok.
Software is held here on github.