Choose the location for the table. You want a clear wall space from floor to ceiling to provide enough room for the table when extended or folded.
Set the two 12-inch boards parallel on the workspace. Make the ends flush. Place a 9 ½-inch board at either end of the longer boards so their ends are flush against the sides of the longer boards. Place the third short board in the middle of the frame to form a shelf.
Apply a bead of glue along the seams at the corners created by the joint of the boards. Apply pressure at each corner to set the glue. Drill screws through the sides of the long boards into the ends of the short boards. Remove excess glue and allow the remaining glue to dry.
Measure and cut the plywood to fit over the back of the frame. Attach the plywood to the frame with screws at each jointures. You will have three screws running down each side of the frame. This becomes the back of the cabinet.
Measure and cut the cutting board to be one inch longer than the cabinet and three inches wider. Measure and mark a horizontal line three inches from the bottom edge.
Line up the hinge barrel with the horizontal line on the cutting board so the leaves take up the space between the bottom of the board and the horizontal line. Screw the hinge into place.
Set the cutting board over the cabinet so the bottoms of both are flush. The free hinge leaves should hang over the base of the cabinet. Line up the hinge so the cutting board has a 1 ½-inch overhang on each side. Screw the hinge into position.
Mount the entire cabinet into the wall. The cutting board should set flush against the wall. Extend the cutting board away from the cabinet. Attach the cabinet to the wall with screws at each corner.
Drill holes partway into the facing sides of the cabinet large enough to accommodate the magnets. Slide the magnets into position before gluing to ensure they fit. Repeat this step at the corresponding locations on the cutting board.
Glue the magnets into the holes so the magnets face each other. Close the table to ensure the magnets work.