Really to do things right you need a footing at least 8 feet deep if more. It's hard to do just a slab and have it not crack. That's why you see sidewalks and pavement cracks all the time, those are just slabs put on the surface. They do their best but it's always going to move a bit from the frost.