The synthesis of g-C3N4 has been thoroughly examined, employing a variety of precursors under thermal conditions. This review delves into the significant influence of these precursors on properties like band gap, and specific surface area (SBET). Moreover, the proposed mechanism for g-C3N4 formation from various precursors has been elucidated, enhancing researchers' comprehension. The review also discusses the supercapacitive performance of g-C3N4 composites with different materials, including metal oxides and sulphides. Similarly, the diverse synthetic approaches explored for BCN have been meticulously investigated in this review. A range of strategies, such as CVD, thermal annealing, and the molten-salt technique, have been scrutinized for producing BCN nanosheets. These nanosheets exhibit excellent performance across multiple domains, encompassing optics, magnetism, and energy storage.