Going over it in my head I initially thought building in a rack could be challenging, but then thought maybe it wouldnt be so bad. The two roadblocks in my mind would be 1) heat, and 2) physical layout.
Heat is a concern, but could be easily solved with the integration of a little computer fan. Probably not a big deal.
Normally for the layout you've got a metal chassis with tubes and transformers that stick out the top or bottom. All that stuff is protected by a wooden head cab. Trying to put everything in one box is problematic because of heat and because how do you actually mount the tubes? They are meant to use both sides of a surface such as the inside and outside of a chassis. Some quick googling and I found pics of a Mesa thing and it made me think that the solution would just involve rack space covers. Build an amp in a standard rack box (1U maybe? if not 2U) where the tubes and transformers protrude out the top, and then include some perforated 2U rack covers to be installed in the spaces above the amp for ventillation. Kinda like this but perforated: