The Residency process starts with an application to the Dominican Embassy or Consulate in your home country. The whole process from start to finish in your country and here in the DR can take more than a year (up to a year in the DR alone after you submit a residency application). Best to have everything done at home before moving here to avoid having to take trips back home mid process. You are legal to live in the DR from the start of your Residency visa provided you submit a formal application to the Govt before that visa expires. Keep a submission receipt as proof of submission.
Lots of info in other threads on DR1 and most anyone will offer lawyer recommendations if requested. Definitely get a lawyer to deal with your initial residency application (Part II) here in the DR. You can do the Embassy stuff at home yourself. After completing the steps at home, send all the paperwork to your lawyer here in the DR so they can start before you even arrive. Keep in mind that the Residency Visa that will be placed in your passport by the DR Embassy in your home country is only valid for 90 days. It is important that your lawyer here has as much of those 90 days to work with as possible. You will need to walk into immigration with your lawyer in Santo Domingo before those 90 days expire.
Lots of original, certified documents to round up. I started the process at home 8 months before moving day.