We show that the main features of the cuprates superconductors phase diagram can be derived considering the disorder as a key property of these materials. Our basic point is that the high pseudogap line is an onset of phase separation which generates compounds made up of regions with distinct doping levels. We calculate how this continuous temperature dependent phase separation process occurs in high critical temperature superconductors (HTSC) using the Cahn-Hilliard approach, originally applied to study alloys. Since the level of phase separation varies for different cuprates, it is possible that different systems with average doping level pm exhibit different degrees of charge and spin segregation. Calculations on inhomogeneous charge distributions in form of stripes in finite clusters performed by the Bogoliubov-deGennes superconducting approach yield good agreement to the pseudogap temperature T*(pm), the onset of local pairing amplitudes with phase locked and concomitantly, how they develop at low temperatures into the superconducting phase at Tc(pm) by percolation.