The shift towards sustainable wastewater treatment focuses on nutrient recovery through biorefineries, highlighting the importance of microalgae, cyanobacteria, and, more recently, purple phototrophic bacteria for their metabolic flexibility and adaptability. Activated sludge has been the primary strategy for wastewater treatment worldwide for the last century. The efficiency of this process has improved the quality of life and reduced the impact of wastewater on the ecosystem by preventing eutrophication processes. However, given the energetic demand for wastewater treatment, the strategy is now shifting towards nutrient recovery from wastewater instead of pollutant removal (Verstraete et al., 2009).