My bathroom has a small cupboard/closet built into the wall, and I'd like to put some shelves inside it. Since I don't own the property, I'm thinking of building a free-standing set of shelves that fit exactly into the inside of the closet, so that I don't have to screw anything into the wall and can remove it easily when moving.
The footprint of the inside looks like this
I used the white stone texture for walls. The top and sides are walls, bottom is the part where the door is.
The whole thing looks like this
Again white stone is the (inwards facing) walls, and the wood texture is where I want the shelves to be. As you can see, halfway up the opening there is a horizontal board (I think it's meant as a laundry chute, but I don't use it for that), so there are actually two openings into one connected space. Because of this, I won't be able to construct the whole thing and place it in: I'll have to partially construct it and then assemble inside of the cupboard.
I made a sketch combining various ideas I had for a general design
I'm assuming I'll be able to find some kind of 1/4" thick board for the shelves, and 3/8" x 3/8" square beams (this is the largest size I can easily hide behind the natural corners of the cupboard, but I can make it larger). I also left 1/16" space between individual pieces to make it easier to model. The shelves are meant to be about 12" high.
My question is, how do I actually attach the shelves to the posts in a way that it won't collapse easily? These will hold a few towels and toilet papers, so the combined load will be <10 lbs, but I'd like to support a more reasonably weight like 20-40 lbs. I am planning to use the cheapest wood I can find at Home Depot.
My first idea was to use diagonal trusses
This picture shows two variants: I could attach the two top ends to each other with a bracket, with the shelf resting on them. Or I could put a horizontal beam and attach the trusses with L-brackets. The problem with the beam is that I'm not sure how to handle the intersection of the two beams at the corner (not shown here) - for example, if I use L-brackets, wouldn't the screws from the two edges bump into each other? Also, I'm worried cutting the diagonal corners will be challenging, since I don't have much equipment (I don't have a mitre box, so I'd be freehanding a dremel). In this version, the vertical posts would probably be single uninterrupted ~24" long pieces.
Another idea I had was this diagonal beam assembly under the shelf
I would attach the two cross beams with T-brackets, and the ends of the beams would rest on top of the posts, I can put a dowel to keep the post from falling inwards. This should brace it enough and also support the shelf. I would still have to cut diagonal corners, but for this it doesn't have to be very precise and I could simply lay the crossbeams on the shelf itself and use it as a template/guide. I can't tell if this is actually a realistic construction, though. In this case the posts would actually be two pieces, so this would essentially be two separate single shelves stacked on top of each other.
I suppose another option is to just use back and side boards like in a freestanding shelf. That would probably be the easiest and most sturdy option, but I feel like since I'll be snug against 3 walls here, I might as well save some material.
What is the best solution in this case?