To add rafters for a deck roof, attach a ledger board to the existing structure at roof level. Add aluminum flashing, paint the rafters, and attach joist hangers. Attach the rafters to the ledger and the vertical end beam. Add fascia board for a finished look.
Alternatively, frame the roof with an incline of at least 1/8 inch per foot to keep water off the roof. Cover the top with 5/8-inch plywood, and leave a gap of 1/8 inch for expanding and contracting. Cut polyisocyanurate, or ISO, board with a utility knife, and anchor it into the plywood with screws and steel washers. Sweep the top of any debris, then attach ethylene propylene diene monomer rubber, known as EPDM, to the ISO board with glue. At the inside of the vertical corners, seal the rubber to the ISO board with extra glue and metal brackets to ensure it does not fall off.
If building a roof over an existing slab of concrete, deck or patio, be sure that local codes allow setting the roof directly on the concrete or deck, and assess if the foundation is sturdy enough to hold the extra weight. Roofs built on insufficiently supported decks may fall and cause damage or injury.