I have done the BZ / San Juan trip. Miami has an in-transit 'lounge' where you are not technically in the states. It's very small, screaming kids, no food, vending machines at best,if you are American as I am it is deplorable.
It does save a bunch of time and paperwork though.
Go to Miami--spend a few days--then go to Puerto Rico
It's a cool place--Rin Con is my favorite. San Juan sucks unless you like Kingston.