Route the stock first. If you make the frame first, there's a really good chance you'll blow out the end of one of the tips of the miters at the corners, and then all your hard work is for naught.

John