This is kind of like asking "How do you perform open heart surgery". Its easy if you know how. This is just about as advanced as you can get in carpentry. Unless you are an experienced carpenter I would not attempt building one yourself from scratch. It is really not the kind of thing that you will get right the first time. If I were you I would stick to prefab parts and/or kits that are available at local millwork supply house. When in doubt, pre drill and use construction adhesive to avoid squeaks and measure twice and cut once.