  Understanding physics of high-$T_c$ cuprate superconductors remains one of
the important problems in materials science. Though a number of diverse
theories argue about the superconductivity and competing orders, ab initio and
quantitative understanding is lacking. Here, we reproduce the experimental
phase diagram of HgBa$_2$CuO$_{4+y}$ by solving its ab initio low-energy
effective Hamiltonian without adjustable parameters. It shows a superconducting
phase in a wide range of hole density $\delta$, and its competition with charge
period-4 plus spin period-8 stripe order near $\delta \sim 0.1$, in agreement
with experimental results including recent X-ray scattering. Then a crucial
role of off-site interactions in stabilizing the superconductivity is
elucidated with emphasis on charge fluctuations. It also clarifies the
condensation energy mainly contributed from the onsite Coulomb interaction. The
present achievement will enable deeper, predictable understanding on open
issues of the high-$T_c$ superconducting mechanism and promote ab initio
studies on strongly correlated electrons beyond parametrized model studies.
