I want an in-home pull-up station that uses a 2x4 in place of a bar for the grip. I’ve never really built anything out of wood before... Any suggestions, tips or tricks?

I’m unsure how to fasten it all together safely, figured I’d worry about that after getting all the pieces cut. At the most basic level, what’s the most optimal way to attach two boards? For the top box structure, should I make 45° cuts as if I was doing baseboard trim?