The image and schematic below show the overall construction of the electronics for the SquishBox. The components are all attached to a rectangular piece of perfboard that plugs directly onto the Pi's GPIO header. Since we're using cheap one-sided perfboard, all the components are soldered to the same side, so the resistor, DAC, and trimpot will fit between the Pi and perfboard, and there will be room inside the enclosure for the LCD on top. The enclosure-mounted components - audio/DC jacks, buttons, and LCD - are connected to the perfboard with strips of ribbon cable, which I like because it keeps thing tidy and the color-coding is helpful for making the right connections. The X's in the schematic show where pins should be removed from the header (you can pull them out with needle-nose pliers) so that connections to the pins on the outside edge of the perfboard can be made more easily by bridging over the back of the board.
Two strips of ribbon cable are used to connect the LCD pins to the perfboard - this is necessary since we can only solder on the top side of the board, so the wires have to be inserted from the bottom, and also allows for the LCD to be mounted in the enclosure body. Hot glue should be used for strain relief at both ends of the ribbon cable, or the wires will definitely tear out while you're assembling the components.
Solder the 2x20 female header into the perfboard, followed by the resistor and trimpot. Mount the trimpot at a point where it will be accessible by a thin screwdriver inserted between the USB ports. The trimpot shown in the inset images is a better choice than the one in the larger image, as a cross-head screwdriver will seat more easily. Bend the pins to one side as shown so you can mount it at a right angle to the board edge. Test fit the location of the DAC in the board and solder in the jumper wires for its connections, but don't solder it in place yet.
Attach the buttons and DC jack to the perfboard and the audio jacks to the DAC using strips of ribbon cable. Hot glue at the board connections is a good idea. Note that the DC jack I used secures with a nut from the inside, so I had to wait until I finished the enclosure before soldering wires to it - make sure to plan ahead how your components will attach. Remove the 1/8" jack from the DAC so it will fit between the perfboard and Pi - you can cut it loose with flush cutters or use a soldering iron to loosen the solder pads and wiggle it loose with pliers. Now you can solder the DAC into its spot on the perfboard.
5Preparing the Enclosure
Screw the hex standoffs into the Raspberry Pi and position it on the lid. You may need to file a notch in the lip of the lid for the SD card so it doesn't get snapped off. Mix some two-part epoxy and put a blob on the bottom of each standoff, press the Pi back down on the lid, and leave it alone for ~24 hours so the epoxy can cure. Now you should be able to mark where to put the openings for the USB ports, SD card slot, LCD mount, buttons, and jacks.
A stepper drill bit is very helpful for drilling larger-sized holes in the enclosure. The square openings can be cut with a handheld jig saw - aluminum is soft enough that a regular blade will do fine. Mask around the edges with tape so you can see where to cut and to protect the finish. Drill holes at the corners of the openings, cut along the sides, and file the edges square.
Screw standoffs into the LCD mounting holes and epoxy the LCD into place as you did with the Pi. You can cut the standoffs with flush cutters or file them down on a fine sanding block to get them the right height. Screw on nuts and washers to mount the rest of your hardware. Be careful not to tear any wires - once things are secure in the enclosure they should be fine. Plug the perfboard assembly onto the Pi - you should have enough slack in your wires to get a decent grip, and screw on the lid of the enclosure. Your SquishBox is finished!