Electronic, magnetic, and transport properties of the antiferromagnetic (AFM) CuMnAs alloy with tetragonal structure, promising for the AFM spintronics, are studied from first principles using the Vienna ab-initio simulation package. We investigate the site-occupation of sublattices and the lattice parameters of three competing phases. We analyze the factors that determine which of the three conceivable structures will prevail. We then estimate formation energies of possible defects for the experimentally prepared lattice structure. Mn$_{rm Cu}$- and Cu$_{rm Mn}$-antisites as well as Mn$leftrightarrow$Cu swaps and vacancies on Mn or Cu sublattices were identified as possible candidates for defects in CuMnAs. We find that the interactions of the growing thin film with the substrate and with vacuum as well as the electron correlations are important for the phase stability while the effect of defects is weak. In the next step, using the tight-binding linear muffin-tin orbital method for the experimental structure, we estimate transport properties for systems containing defects with low formation energies. Finally, we determine the exchange interactions and estimate the Neel temperature of the AFM-CuMnAs alloy using the Monte Carlo approach. A good agreement of the calculated resistivity and Neel temperature with experimental data makes possible to draw conclusions concerning the competing phases.