  Sun like stars are born from the collapse of fragment of molecular clouds.
During the first embedded phase (the so called class 0/1), the protostar is
surrounded by a collapsing envelope, whose physical and chemical structure
would set up the initial conditions of the proto-stellar disk which may
eventually form planets. In this contribution, we show how spectroscopic far
infrared to millimeter observations can be a powerful diagnostic to derive the
chemical and physical structure of the innermost regions of envelopes
collapsing around solar type protostars, where disk are believe to form. Our
claim is based on the simultaneous modeling of the dynamics, chemistry and
radiative transfer in a protostellar envelope. Here we present a study of a
class 0 protostar NGC1333-IRAS4, obtained using ISO-LWS observations of water
far-infrared lines. We show the derived physical and chemical structure of the
protostar, namely the density and temperature profiles, as well as the water
abundance across the envelope. Besides, the mass of the central protostar and
its accretion rate can be constrained by these observations and modeling,
yielding an alternative method to measure these two poorly know parameters.
