Stacking cabinets rely on uniformity to work properly. The design of the box isn't really that important, but the cabinet should be small enough for you to pick up.
The ideal size is between 12 and 18 inches deep, 32 inches tall and no wider than about 36 inches. That's just about right for you to wrap your arms around and lift.
Plan on adding a door or two door to the front; however, the door design is up to you, it won't make any difference to the stacking ability. The bottom box can be almost any size, as long as the cabinet on top of it is smaller by 1 1/2-inches in width and length, with each following cabinet also reduced by the same margin as they ascend.
For example, if the bottom box is 24-by-24 inches, the one that fits into it should be 22-1/2-by-22-1/2. The locking, or bonding of the cabinets comes from the face frame and side jambs on the cabinet as they fit around the perimeter of the preceding cabinet.
Construct the box out of 3/4-inch fir or hardwood plywood for lightness -- remember that you will be lifting them. Lots of cabinetmakers use particleboard, but it's too heavy.
Build the boxes any way you like with mitered or butt joints at the corners. Take care that all of the boxes are uniform.
Cut all of the pieces for all of the cabinets at once and assemble the boxes at the same time. Don't add a shelf during the initial construction; install it later using shelf clips.
This helps to cut down the weight as well. Staple all the plywood boxes together using glue and 2-inch staples.
Here's the key to stacking cabinets, install the bottom and top panels 1 inch from the edges to form a lip at the top and bottom around the perimeter of the box. The lip provides the stacking feature after the face frame is glued on.
Build a face frame using 3/4-by-3 1/2-inch hardwood. The face frame is the front, exterior side on almost all cabinets.
The face frame lends integrity, stability and beauty to the boxes. Cut the pieces to form a hardwood frame that fits flush on the sides, top and bottom of the box.
The 1-inch lip at the top and bottom will match the lip you created with the top and bottom shelf. Add glue and use a pin nailer with 1-1/4-inch pin nails to attach it flush at the top, bottom and sides, to the front edge of the box.
Add clamps and allow the face frame to bond to the box overnight. Remove the clamps and sand the cabinet smooth with a hand block and 100-grit sandpaper.
Add stain and varnish, or paint as desired.
Cut the doors out of 3/4-inch hardwood plywood. Start out by cutting a single piece of plywood that's 3/4-inch bigger on all four sides than the face frame opening.
It's OK to use a single door if desired, but it works better if you split the door in half to make two doors side-by-side on the cabinet. Sand and finish the doors to match the cabinets, and use your choice of hinges to hang the doors.
Stack the cabinets one on top of the other, the 1-inch lip on the top and bottom fits it's predecessor perfectly to lock the cabinets into place.