If you want to comply with code, keep in mind foam has to be covered. While drywall is common, there are some coatings that will make it fire retardent. Consider appearance. You may not care but plain spray foam is usually not pretty.
For the ceiling/roof, I'd look at liner panels (thin interior corrugated metal pre finished) and as much cellulose as you can afford. High and low venting (often ridge and rave) would be required. This offers a little protection from future roof leaks in that you would have to replace less than if sprayed.
For the walls, a thin layer of spray foam covered with fiberglass or rock wool - often referred to as flash and batt - is an option. The book shelf girts favor this. Than ply, drywall, OSB, liner panel, rough sawn pine (my favorite), other, on the inside. You probably could replace spray foam with diy rigid foam, seal edges with foam in a can, and get good air sealing.
Just an option with cost savings in mind. If you're contracting all of it in any case, probably not so much savings. Just not recommended to diy spray foam.