  The large-scale structure is a major source of cosmological information.
However, next-generation photometric galaxy surveys will only provide a
distorted view of cosmic structures due to large redshift uncertainties. To
address the need for accurate reconstructions of the large-scale structure in
presence of photometric uncertainties, we present a framework that constrains
the three-dimensional dark matter density jointly with galaxy photometric
redshift probability density functions (PDFs), exploiting information from
galaxy clustering. Our forward model provides Markov Chain Monte Carlo
realizations of the primordial and present-day dark matter density, inferred
jointly from data. Our method goes beyond 2-point statistics via field-level
inference. It accounts for all observational uncertainties and the survey
geometry. We showcase our method using mock catalogs that emulate
next-generation surveys with a worst-case redshift uncertainty, equivalent to
${\sim}300$ Mpc. On scales $150$ Mpc, we improve the cross-correlation of the
photometric galaxy positions with the ground truth from $28\%$ to $86\%$. The
improvement is significant down to $13$ Mpc. On scales $150$ Mpc, we achieve a
cross-correlation of $80-90\%$ with the ground truth for the dark matter
density, radial peculiar velocities, tidal shear and gravitational potential.
