This is not an area with hard and fast rules. In fact they can vary quite a lot and still achieve good results.
What I do is more or less this:
For nest boxes I like them about twelve inches wide, fourteen inches deep, by about ten to twelve inches tall. Dark, but well ventilated. I've gone over to community nests now, but that was what I used for years.
For roosts. I mostly keep the dual purpose large fowl breeds so I like the roosts to be about two feet off the ground for the lowest one, the next one is about ten to twelves inches higher. A foot of distances between the roosts and twelves inches of linear distance per bird when figuring out how many roosts that I need. The birds won't use them evenly and that's normal. In the winter they'll crowd in cheek to jowl to stay warm. In the summer they'll be kicking each other off to stay cooler. They'll develop their favorite spots which the top birds will claim with the lesser birds taking next best on down to the bottom.
For heavy weights and breeds that don't fly well I make the lowest roost only a foot off the ground and some won't use roosts anyway. Other birds like Leghorns and heritage breed turkeys like to roost as high as they can get so if you have a dedicated coop for them put the roosts high.