  Using the formalism of geometrothermodynamics to derive a fundamental
thermodynamic equation, we construct a cosmological model in the framework of
relativistic cosmology. In a first step, we describe a system without
thermodynamic interaction, and show it to be equivalent to the standard
$\Lambda$CDM paradigm. The second step includes thermodynamic interaction and
produces a model consistent with the main features of inflation. With the
proposed fundamental equation we are thus able to describe all the known epochs
in the evolution of our Universe, starting from the inflationary phase.
