nanocomposite was also reported in our lab . The synthesis procedure involved the polycondensation of melamine and benzene-1,3,5-tricarboxyaldehyde in the presence of g-C3N4. COF/g-C3N4 was used as a precursor for the synthesis of N-doped carbon and N-doped carbon/g-C3N4. The prepared materials were used as electrode materials for supercapacitors and lithium-ion batteries (LIBs). COF, COF/g-C3N4, N-doped carbon, and N-doped carbon/g-C3N4 exhibited specific capacitance of 211, 257.5, 450, and 835.2 F/g, respectively. N-doped carbon/g-C3N4 was used to assemble asymmetric devices that offered energy density and power density of 45.97 Wh•kg -1 and 659.3 W•kg -1 , respectively .