Based on the arrangement of two-dimensional 'melon', we construct a unit cell for polymeric carbon nitride (PCN) synthesized via thermal polycondensation, whose theoretical diffraction powder pattern includes all major features measured in x-ray diffraction. With the help of this unit cell, we describe the process-temperature-induced crystallographic changes in PCN that occur within a temperature interval between 510 and 610 °C. We also discuss further potential modifications of the unit cell for PCN. It is found that both triazine- and heptazine-based g-C3N4 can only account for minor phases within the investigated synthesis products.